Unknown alias in ksh script problem.

David C Lawrence tale at pawl.rpi.edu
Fri Oct 27 06:08:08 AEST 1989


In <7010003 at hpfcso.HP.COM> pld at hpfcso.HP.COM (Paul Dineen) writes:
Paul>  When I pipe to an alias in a ksh script, the alias definition
Paul>  is always unknown.  For example: [...deleted...]

Paul>  When the line "ll | bigfiles" is executed from the keyboard,
Paul>  there is no problem.

In <1487 at crdos1.crd.ge.COM> davidsen at crdos1.crd.ge.COM (Wm E Davidsen Jr):
Bill>   Did you forget to export PATH? That would leave the script
Bill>   using the default.

The problem is not at all related to PATH.  As with any shell that
allows aliasing and/or function definition, the aliases and functions
are not passed to children.  Only variables exported to the environment
are directly availble.  If he wants the bigfiles alias, he will have
to define it in the script, or source the script rather than execute it.

Dave
-- 
 (setq mail '("tale at pawl.rpi.edu" "tale at itsgw.rpi.edu" "tale at rpitsmts.bitnet"))



More information about the Comp.unix.questions mailing list