Hi, I was trying to print out the command list after SSH'ing and was sending this command:
echo $PATH | awk '{split($1,my,":"); for(i in my) print my_ }' | xargs ls
when I read the output, I'm getting a lot of strange characters where the tabbing should be:
[1;36m
is this a character encoding issue? Have you encountered this before?
Thanks for any help you can provide. Sonny_
Looks like an ANSI escape code, probably part of your prompt or colorized ls output: http://en.wikipedia.org/wiki/ANSI_escape_code#Sequence_elements
From reading the wiki page it looks like text color is being set to cyan.
Regards /J
Ah, that makes sense. Is there an easy way to remove these escape codes from a Java string?
If this really is ls coloring I'd disable them at the source. Do "ls -color=none" on the remote system.
Log in to post a comment.
Hi,
I was trying to print out the command list after SSH'ing and was sending this command:
echo $PATH | awk '{split($1,my,":"); for(i in my) print my_ }' | xargs ls
when I read the output, I'm getting a lot of strange characters where the tabbing should be:
[1;36m
is this a character encoding issue? Have you encountered this before?
Thanks for any help you can provide.
Sonny_
Looks like an ANSI escape code, probably part of your prompt or colorized ls output:
http://en.wikipedia.org/wiki/ANSI_escape_code#Sequence_elements
From reading the wiki page it looks like text color is being set to cyan.
Regards /J
Ah, that makes sense. Is there an easy way to remove these escape codes from a Java string?
If this really is ls coloring I'd disable them at the source. Do "ls -color=none" on the remote system.