Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Useful Terminal Commands.
#11
(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.
My website - My git repos

"Things are only impossible until they’re not." - Captain Jean-Luc Picard
Reply


Messages In This Thread
Useful Terminal Commands. - by bob777 - 09-02-2018, 02:13 AM
RE: Useful Terminal Commands. - by Cthulhu - 09-02-2018, 02:26 AM
RE: Useful Terminal Commands. - by leon.p - 09-02-2018, 01:56 PM
RE: Useful Terminal Commands. - by bescott9944 - 09-07-2018, 12:27 AM
RE: Useful Terminal Commands. - by leon.p - 09-26-2018, 07:31 PM
RE: Useful Terminal Commands. - by bescott9944 - 06-07-2019, 05:12 AM
RE: Useful Terminal Commands. - by inraidius - 09-27-2018, 02:29 PM
RE: Useful Terminal Commands. - by SirGuyCarleton - 09-27-2018, 11:23 PM
RE: Useful Terminal Commands. - by rick forges - 09-28-2018, 10:01 PM
RE: Useful Terminal Commands. - by leon.p - 10-01-2018, 01:22 PM
RE: Useful Terminal Commands. - by waterismygod - 02-04-2019, 02:02 PM
RE: Useful Terminal Commands. - by Cthulhu - 03-23-2019, 09:47 AM
RE: Useful Terminal Commands. - by leon.p - 03-25-2019, 06:59 PM
RE: Useful Terminal Commands. - by smartin - 07-03-2019, 10:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)