Re: Why is this not working?
From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 05/26/04
- Previous message: Joseph Fenn: "UNIX VS MICROSOFT"
- In reply to: Lekeas GK: "Why is this not working?"
- Next in thread: Lekeas GK: "Re: Why is this not working?"
- Reply: Lekeas GK: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 May 2004 21:15:40 GMT
On 2004-05-26, Lekeas GK wrote:
> Hi All,
>
> I am trying to create a script which would look like the which command
> under tcsh. I wrote the following script:
>
> #! /usr/bin/bash
> if ! `alias $1`; then
> echo "$1 is aliased to " `alias $1|cut -d\' -f2`
> fi
>
> However, when I execute it I get touch is aliased to ( which is not
> true, as I have created an alias for touch).
Aliases are not exported.
> Assuming I can get that to work, my next step would be to run which under
> tcsh and return the result to standard input.
Why? What's wrong with bash's builtin, type?
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Previous message: Joseph Fenn: "UNIX VS MICROSOFT"
- In reply to: Lekeas GK: "Why is this not working?"
- Next in thread: Lekeas GK: "Re: Why is this not working?"
- Reply: Lekeas GK: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|