Why is this not working?
From: Lekeas GK (cj571_at_soi.city.ac.uk)
Date: 05/26/04
- Next message: Stephane CHAZELAS: "Re: Quoting"
- Previous message: Lekeas GK: "Quoting"
- Next in thread: Chris F.A. Johnson: "Re: Why is this not working?"
- Reply: Chris F.A. Johnson: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 May 2004 15:33:23 +0100
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).
Assuming I can get that to work, my next step would be to run which under
tcsh and return the result to standard input. How would that be possible?
I look forward to hearing from you soon.
Thanks in advance.
George
- Next message: Stephane CHAZELAS: "Re: Quoting"
- Previous message: Lekeas GK: "Quoting"
- Next in thread: Chris F.A. Johnson: "Re: Why is this not working?"
- Reply: Chris F.A. Johnson: "Re: Why is this not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|