[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] who is the fastest bash scripter?
- Subject: [ale] who is the fastest bash scripter?
- From: jasonday at worldnet.att.net (Jason Day)
- Date: Tue, 25 Feb 2003 11:44:45 -0500
On Tue, Feb 25, 2003 at 10:39:20AM -0500, Michael D. Hirsch wrote:
> On Monday 24 February 2003 06:00 pm, David S. Jackson wrote:
> > You know, you're calling an extra echo command and doing a conditional
> > check (&&) when all you need to do is tell grep to include the filename
> > in its printout. (See the -H switch in man grep.) No need to call any
> > other utilities or spawn any other processes.
>
> This doesn't sound right to me. Since grep is reading from stdin in these
> scripts it can't possibly know the name of the file.
You're right. I knew there was something wrong with using the -H switch
in this circumstance, but I never went back and investigated why after
David's post. Also, if you don't care about grep's output, you can
redirect it to /dev/null, and just get the name of the jar file.
Then again, if that's what you want, you could just do "grep -H *.jar".
Jason
--
Jason Day jasonday at
http://jasonday.home.att.net worldnet dot att dot net
"Of course I'm paranoid, everyone is trying to kill me."
-- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale