Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bash to Zsh Funny



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