Paul Jungwirth on 1 Oct 2011 18:41:51 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] saw this on /. this morning.


On Sat, Oct 1, 2011 at 8:32 PM, Ryan T. Sawyer <sawyer07+plug@gmail.com> wrote:
> Is there an equivalent to this in Bash?
>
> alias lsr 'ls -R | grep \!* | sort'

In general, I think with bash it's easier to write functions rather
than aliases. If you create a file with your functions for
command-line shortcuts, you can source it in your .bash_profile. (Or
just define the functions in .bash_profile itself.) If you create a
function named lsr, you can use $1, and you can call it just like
using an alias.

Paul

-- 
_________________________________
Pulchritudo splendor veritatis.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug