bug-bash
[Top][All Lists]
Advanced

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

Re: alias for commands broken in bash 2.05.0


From: william
Subject: Re: alias for commands broken in bash 2.05.0
Date: Tue, 7 Aug 2001 18:45:04 EDT

Brian,

Thanks for answering so quickly, but the next question
is what am I supposed to do instead?
I have to work in an environment where people have defined
a bunch of commands as aliases because they need
access to other aliases and to the environment.
It all worked fine under ksh on SCO...
I have a script that I source to define all of the aliases
and then I can use the aliases at the command line.
Also, some of the aliases end up sourcing scripts that
use other aliases.  Don't blame me -- I didn't design this,
but I have to use it.
It is all happy interactively, but I have a script for starting
long builds, and the aliases in the script are not working.
It would help to be able to export aliases as in ksh,
but now with bash, it looks like I can't even change the aliases
into two-line scripts that source the setup script and then run
the alias line because they would still not have access to the internal
nested aliased commands.  What is the approved way of dealing with this?
Do I have to make a ton of little scripts that call each other?

William

   From owl486.scs.com!rachael.scs.com!ua.com!bfox Tue Aug  7 18:26:17 2001
   From: "Brian J. Fox" <address@hidden>
   CC: address@hidden, address@hidden, address@hidden
   Date: Tue, 07 Aug 2001 15:26:01 -0700

      From: William Bader <address@hidden>
      Date: Tue, 7 Aug 2001 18:15:21 EDT

      The two-line script below prints "abc: command not found"
      instead of the current directory on bash-2.05.0.
      I built bash from source under RedHat 7.1 (with RedHat's gcc)
      and SCO ODT 2.0 (with gcc-2.7.2.1).
      It also happens with the bash-2.04.21 distributed by RedHat.

        alias abc=pwd
        abc

   Good, I'm glad it's working as advertised!

   Thanks,

   Brian

   PS: This behavior is exactly correct; aliases are not exectued within
       scripts.  Imagine what one could do by aliasing `su to be
       something else...

   == The Difference Between Cultures: ==
       Einigkeit und Recht und Freiheit
       Liberte', E'galite', Fraternite'
       Sex, drugs and rock'n'roll



reply via email to

[Prev in Thread] Current Thread [Next in Thread]