Computing.Net > Forums > Unix > Strange chars in Expect log_file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Strange chars in Expect log_file

Reply to Message Icon

Name: wjlost
Date: April 16, 2004 at 04:51:20 Pacific
OS: Linux
CPU/Ram: P4
Comment:

Hi,
I'm fairly new to tcl and expect. I'm using expect to ssh into another account, and dump the contents of a directory (via "ls -la").

I'm using log_file in order to get the stdout into a file on my machine.
When I open this file later on (vi) I see some strange characters, at the end of every line:
drwx------ 3 root root 4096 Apr 14 06:54 ^[[00m.bashrc^[[00m

this line displays normally this way:
drwx------ 3 root root 4096 Apr 14 06:54 .bashrc

What am I missing here?

Here is the script (very short):
#! /usr/bin/expect --
spawn ssh -l newuser 127.0.0.1
expect "assword:"
send "newpass\r"
expect "]$ "
send "ls -la\r"
log_file outfile
expect "]$ "

Thanks,
Walter J.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


UNIX or Windows NT? Command line arguments



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Strange chars in Expect log_file

Help : running sqlplus in EXPECT www.computing.net/answers/unix/help-running-sqlplus-in-expect/6707.html

detect a char in a string (ksh) www.computing.net/answers/unix/detect-a-char-in-a-string-ksh/4896.html

Tell Numeric from Char in Unix script www.computing.net/answers/unix/tell-numeric-from-char-in-unix-script/3666.html