ScSSHShell: How to get clean result?
Posted: Tue 29 Jan 2008 14:49
hello,
I have some troubles having the TScSSHShell behaving correctly...
with this code:
scshell.WriteString('ls -l'+ #13#10);
memo1.Lines.Add(scshell.ReadString);
the first time nothing happens, i only get the prompt:
[admin@myserver admin]$
the second time i issue the command i get:
[00mtotal 224
-rwxrwxr-- 1 admin admin 71 Jul 11 2005 [01;32mags.log[00m
-rw-r--r-- 1 admin admin 179 Aug 4 2005 [00mcall_wsdl.vbs[00m
-rw-rw-r-- 1 admin admin 1912 Apr 16 2007 [00mcrontab.admin.backup[00m
drwxr-xr-x 2 admin admin 4096 Apr 10 2006 [01;34mcygwin[00m
-rw-r--r-- 1 admin admin 268 Jul 14 2005 [00mdir_structure.txt[00m
-rwxrwxr-- 1 admin admin 53 Jul 11 2005 [01;32medi.log[00m
-rw-r--r-- 1 admin admin 195007 Aug 10 2006 [00mlog.ivo[00m
-rw------- 1 admin admin 3840 Aug 10 2006 [00mmbox[00m
[m[admin@myserver admin]$
[A[admin@myserver admin]$[K
[admin@myserver admin]$
- how to i get a clean result? for instance the last 3 lines...
- what is the '[K' and '[00' string appearing everywhere?
Thank you a lot!
Dave
I have some troubles having the TScSSHShell behaving correctly...
with this code:
scshell.WriteString('ls -l'+ #13#10);
memo1.Lines.Add(scshell.ReadString);
the first time nothing happens, i only get the prompt:
[admin@myserver admin]$
the second time i issue the command i get:
[00mtotal 224
-rwxrwxr-- 1 admin admin 71 Jul 11 2005 [01;32mags.log[00m
-rw-r--r-- 1 admin admin 179 Aug 4 2005 [00mcall_wsdl.vbs[00m
-rw-rw-r-- 1 admin admin 1912 Apr 16 2007 [00mcrontab.admin.backup[00m
drwxr-xr-x 2 admin admin 4096 Apr 10 2006 [01;34mcygwin[00m
-rw-r--r-- 1 admin admin 268 Jul 14 2005 [00mdir_structure.txt[00m
-rwxrwxr-- 1 admin admin 53 Jul 11 2005 [01;32medi.log[00m
-rw-r--r-- 1 admin admin 195007 Aug 10 2006 [00mlog.ivo[00m
-rw------- 1 admin admin 3840 Aug 10 2006 [00mmbox[00m
[m[admin@myserver admin]$
[A[admin@myserver admin]$[K
[admin@myserver admin]$
- how to i get a clean result? for instance the last 3 lines...
- what is the '[K' and '[00' string appearing everywhere?
Thank you a lot!
Dave