unix - single quotes not working in shell script -
I have a .bash_profile script and I have the following alias for the following: lsls = 'ls -l | Sort-n +4 '
When I type the nickname of LSL it is in a way but then posts this error message "-bash: +4: command not found" I nickname To '+4'?
This works when Type LS-L |
I am in OS X 10.4
Thanks for any help
bash-4.0 $ ls -l | Sort -n +4 Type: Open failure: +4: Any such file or directory
you have ls -l | Sort -n -k 5
, gnu sort is different from BSD sort
alias lsls = 'ls -l | Edit-n -k 5 '
Edit: Update based on indexing from 1 based indexing to 1 reflecting changes, thanks to Matthew.
Comments
Post a Comment