Re: Ignored alias inside for loop

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

 



On Sun, Jul 26, 2015 at 04:09:12PM +0000, Rusty Bird wrote:

Hello,

> > Using a function instead of an alias, or using eval will do what
> > you want.
> 
> Do you mean replacing the line with: eval "alias foobarbaz='echo ok'"
> That doesn't seem to work either (in dash or bash).

In this case, where there is no further expansion to be done in the
alias content, you could use a mere variable:

  foobarbaz='echo ok'
  $foobarbaz "$@"

Or, if some further expansion has to be made, 'eval' again:

  foobarbaz='echo $PATH'
  eval $foobarbaz '"$@"'

++
Seb.

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux