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

Re: Handy Bash alias script



a.list.address@gmail.com wrote:
> 
> ...and have it work?  Aliases don't support $1 or $@, do they?
> 

See bash man-page:

       There is no mechanism for using arguments in the replacement
       text.  If arguments  are  needed, a shell function should be
       used (see FUNCTIONS below).

So something like

  > techo () { echo this $1 and that ; }

should work as expected:

  > techo xxx
  this xxx and that

Regards,
Jörg-Volker.



Reply to: