[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing For Loop To Accept Spaces

From: Brian J. Fox
Subject: Re: Forcing For Loop To Accept Spaces
Date: Fri, 19 Apr 2002 05:31:17 -0700

   Date: Fri, 19 Apr 2002 05:46:18 -0600
   From: SoloCDM <address@hidden>

   "Brian J. Fox" stated the following:
   > Please try:
   > for i in "foo bar" bar "bar baz"; do rm -i "$i"; done

   In the attached script you'll notice I tried redirecting the data to a
   file and storing it in a variable.  Either way it doesn't work.  The
   files come out broken up in the for loop.  In the "echo $MFILES"
   they're not broken.

I say again:

for i in "$(find .)"; do echo "$i"; done


   Note: When you reply to this message, please include the mailing
         list/newsgroup address and my email address in To:.

   Content-Type: text/plain; charset=us-ascii;
   Content-Transfer-Encoding: 7bit
   Content-Disposition: inline;


   #MFILES=`find $mredm -type f \( -iname *personal* -o -iname .*personal* \) 
-print | sed "s+ +' '+g"`
   #find $mredm -type f -maxdepth 3 \( -iname *personal* -o -iname .*personal* 
\) -print | sed -e "s+^+'+g" -e "s+$+'+g" > sample-data
   MFILES=`find $mredm -type f -maxdepth 3 \( -iname *personal* -o -iname 
.*personal* \) -print | sed -e "s+^+'+g" -e "s+$+'+g"`
   #echo $MFILES
   #exit 1
   #for f in `cat sample-data`
   for f in ${MFILES}
           #/bin/./ls -hFlA "$f"
           echo $f


== The Difference Between Cultures: ==
    Einigkeit und Recht und Freiheit
    Liberte', E'galite', Fraternite'
    Sex, drugs and rock'n'roll

reply via email to

[Prev in Thread] Current Thread [Next in Thread]