Hello there,
As a newbie:
The directories in PATH can be hard to distinguish when printed out as
one line with colon .Please, can i have a sample script to display
them,one to a line.
Thank you.
Moderators: ChriThor, LXF moderators
echo $PATH | awk -F: '{for (i=1; i<=NF; i++) print $i}'
Nobber wrote:Try:
echo $PATH | sed 's/:/\n/g'
at the bash prompt.
nelz wrote:sed seems somewhat simpler for this particular operation.
Users browsing this forum: No registered users and 0 guests