On Tuesday 13 March 2007 05:46, Sylvester Lykkehus wrote:
> Sylvester Lykkehus wrote:
> > Hi,
> >
> > Just playing around a bit with different colors in shell scripts, I've
> > come across a problem colorings an output parsed through xargs.
> >
> > I'm sure it's just a question of escaping the string correctly.
> >
> > /echo -e '\E32mTest' /
>
> echo -e '\E[32mTest'
>
> > Prints the word Test in green.
> >
> > While
> > echo Test > test.txt
> > /cat test.txt | xargs -i echo -e '\E32m{}' /
>
> cat test.txt | xargs -i echo -e '\E[32m{}'
>
> > prints \E32mTest
>
> prints \E[32mTest
>
> > Any ideas ?
>
> /Sylvester

I don't know about xargs, but changing the color of the output of cat can be 
done like:

echo -e '\E[32m' < cat test.txt

Although I would imagine that there are better ways.....

- James W.
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to