Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bash to Zsh Funny
- X-seq: zsh-users 8567
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Bash to Zsh Funny
- Date: Wed, 09 Mar 2005 11:26:37 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: news <news@xxxxxxxxxxxxx>
Hi,
The following runs as bash but not zsh, because the line which evaulates to:-
gvim.exe note123.txt note345.txt &
In bash fine gvim edits the two files
in zsh
gvim tries to edit the filename "note123.txt note345.txt" as tho it were one long filename
#!/bin/zsh
# gg
# description : vi all files containing $1 in name
set +x
cd c:/intranet/note/
if [ $# -gt 0 ]
then
files=$(grep -il "note [0-9][0-9][0-9].*$1" $(find . -name 'note???.txt'))
if [ "$files" != "" ]
then
files=${files//[[:space:]]/ }
echo $files
gvim.exe $files &
else
echo sorry $1 not found
fi
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author