Re: Shell: for-schleife ?ber Zeilen einer Datei

From: André Braselmann <lists(at)braisel.com>
Date: Sun, 22 Feb 2009 21:17:20 +0100

On Sun, Feb 22, 2009 at 09:02:00PM +0100, Timm Wimmers wrote:
>
> Moin,
>
> for INDEX in `cat <FILE>`; do
> echo $INDEX
> done
>
while read -r f ; do
        if [ "x$f" != "x" ]; then
             echo $f
        fi
fi ; done < $FILE
                    
sowas? sortiert zumindestens die Zeilen raus, die KEIN Zeichen
enthalten.

                                             
K.André Braselmann

--
"I have a good reason for finding the system inappropriate 
 for my intended deployment platform"
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sun 22 Feb 2009 - 21:17:32 CET

search this site