Eikonal Blog

2010.12.02

Unix “script” command

Filed under: unix — Tags: , , — sandokan65 @ 12:16

Implementation of the same functionality in Expect

Cygwin does not come with the “script” commands, so following implementation in Expect can do the same thing:

    script.expect
    #!/bin/expect
    
    spawn /bin/bash
    
    if {[lindex $argv 0]==""} {
            log_file SESSION.txt
       } else {
            log_file [lindex $argv 0]
       }
    
    interact
    

1 Comment »

  1. […] Unix “script” command – https://eikonal.wordpress.com/2010/12/02/unix-script-command/ […]

    Like

    Pingback by Unix pages (at this blog) « Eikonal Blog — 2011.04.04 @ 15:46


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: