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

Strange chars in Expect log_file

Reply to Message Icon

Original Message
Name: wjlost
Date: April 16, 2004 at 04:51:20 Pacific
Subject: Strange chars in Expect log_file
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.


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Strange chars in Expect log_file

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software