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
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 "]$ "
Summary: I have an expect script that does sftp and the next step I would like to do is to run a database call using sqlplus. Using ksh, I can easily write that as: sqlplus -s << EOF scott/tiger spool t...
Summary: Hello, I try to detect the presence of a char in a string. This is korn shell. mystring="1234-" mychar="-" if [ mystring includes mychar ] ; then exist=1 else exist=0 fi What should I write inst...
Summary: Hi, I am having a problem determinig how to write an awk script that will do the following. I have a file and in that file I am looking at a certain field. This field will contain one of tow things. A...