viele Möglichkeiten (Re: Datei bis zur ersten Leerzeile au…

Αρχική Σελίδα
Συνημμένα:
Μήνυμα σαν ηλεκτρονικό μήνυμα
+ (text/plain)
Delete this message
Reply to this message
Συντάκτης: Hans Spath
Ημερομηνία:  
Προς: Linux User Schwabach
Παλιά Θέματα: Re: Datei bis zur ersten Leerzeile ausgeben ...
Αντικείμενο: viele Möglichkeiten (Re: Datei bis zur ersten Leerzeile ausgeben ...)
At 20.05.2003 22:50 +0200, Hans Spath wrote:
>At 20.05.2003 22:29 +0200, Hans Spath wrote:
>>grep -xB1000000 -m1 "" $FILE
>cat $FILE | perl -e "while(<>){exit if(/^$/);print}"


perl -e '$/="\n\n";chomp($_=<>);print' $FILE
perl -ne "exit if(/^$/);print"
perl -pe "exit if/^$/"$FILE
perl -pe 'exit if$_ eq"\n"' $FILE

btw. Haris lag mit sed gar nicht so verkehrt

sed '/^$/Q' $FILE

so, jetzt reichts aber :)

Gruß,
Hans