Hello simple question :
how can i split the $PATH by the ":" seperator with one liner ?
mybe using awk is there any builtin function in awk that splits and prints the output ?
thanks
echo $PATH | tr -s ':' '\n'
for i in `echo $PATH | sed "s/ /g"`
do
echo $i
done
If you want to process the lines rather than just output them, replace echo with the processing.