10-01-2018, 01:22 PM
(09-28-2018, 10:01 PM)rick forges Wrote: echo $PATH | sed "s,:,\n,g" works in terminal but not when assigned to an alias
had to remove the single quote in front of echo
what am I missing ?
btw I used
alias path=echo $PATH | sed "s,:,\n,g"
Try the following:
Code:
alias path='echo $PATH | sed "s,:,\n,g"'
You have to quote the command because an alias is effectively a veriable in bash.