Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bash to Zsh Funny
- X-seq: zsh-users 8573
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Bash to Zsh Funny
- Date: Thu, 10 Mar 2005 13:24:15 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <m5nt21910820l24esnv1ba14cnlb2f5go9@xxxxxxx> <fb6be96e0503090341b9bce6f@xxxxxxxxxxxxxx> <422EE58B.11159.2A9B3CE@localhost>
- Sender: news <news@xxxxxxxxxxxxx>
Hi
What I ended up with
#!/bin/zsh
# gg
# description : vi all notes containing keyword ($1) in subject
cd c:/note/
if [ $# -gt 0 ]
then
files=($(egrep -il "note [0-9]{3}.*$1" note???.txt))
if [ "$files" != "" ]
then
echo $files
gvim.exe $files &
else
echo sorry $1 not found
fi
else
echo "Keyword required eg:- > gg php"
fi
Any improvments?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author