in reply to odd escape chars in strings obtained by SSH
If you can edit the .bashrc for this user account on the target machine, you can control both the "ls" behavior and the command prompt string:
(or maybe you want the prompt string to be something particular other than '$ ' -- it's up to you). If you can't edit that .bashrc file, just issue those two command lines first thing when you connect, and then only pay attention to the lines that are returned after that point.alias ls='/bin/ls --color=never' PS1='$ '
Well, in the case where "wantarray" returns true, of course chomp does nothing, because split /\n/ removes all the line-feed characters.(the chomp removes zero chars, by the way)if ( wantarray ) { my @a = split "\n", $r; # chomp( @a ); return \@a; } else { return $r; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: odd escape chars in strings obtained by SSH
by Fletch (Bishop) on Oct 11, 2007 at 18:44 UTC | |
|
Re^2: odd escape chars in strings obtained by SSH
by danmcb (Monk) on Oct 12, 2007 at 08:24 UTC | |
by toma (Vicar) on Oct 12, 2007 at 16:17 UTC | |
|
Re^2: odd escape chars in strings obtained by SSH
by danmcb (Monk) on Oct 12, 2007 at 07:46 UTC |