Hi,
For a 'script' I have put together I needed to get the
PATH variable - and convert the contents of it from:
/usr/dt/bin:/usr/openwin/bin.... etc
to a file...
/usr/dt/bin
/usr/openwin/bin
I have achieved this using:
echo $PATH | tr ":" "\012"
This is absolutely fine, but how could you do this
with sed or awk instead?
I was struggling to work out how to handle control characters in those two beasts...
Thanks!
For a 'script' I have put together I needed to get the
PATH variable - and convert the contents of it from:
/usr/dt/bin:/usr/openwin/bin.... etc
to a file...
/usr/dt/bin
/usr/openwin/bin
I have achieved this using:
echo $PATH | tr ":" "\012"
This is absolutely fine, but how could you do this
with sed or awk instead?
I was struggling to work out how to handle control characters in those two beasts...
Thanks!