Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh adding single quotes as it pleases
- X-seq: zsh-users 14433
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: zsh adding single quotes as it pleases
- Date: Thu, 24 Sep 2009 16:12:58 -0400
- In-reply-to: <64763.153.98.68.197.1253790454.squirrel@xxxxxxxxxxxxxxxxxxx> (Jerry Rocteur's message of "Thu, 24 Sep 2009 13:07:34 +0200 (CEST)")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <64763.153.98.68.197.1253790454.squirrel@xxxxxxxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
I suspect you want to do something like this:
function printargs () {
local x i=0 n
n=$1 ; shift
for x in $@ ; do
echo "${n}[$((i++))]: $x"
done
}
cat ll.txt | sed -e '/^\ *\#/d' | while IFS='' read line ; do
echo "line= $line"
eval printargs arg $line
done
output:
line= -a p1vkg/Bis1234/"XXXXXXXX XXXXXXX XX"
arg[0]: -a
arg[1]: p1vkg/Bis1234/XXXXXXXX XXXXXXX XX
line= -a r0esmm/Bis1234/"XXX XXX - XXXX"
arg[0]: -a
arg[1]: r0esmm/Bis1234/XXX XXX - XXXX
greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author