Search Results

Search: Posts Made By: losttouch
1,565
Posted By balajesuri
Welcome to the forum. perl -ne 'chomp;...
Welcome to the forum.

perl -ne 'chomp; if(/^New:/){print "\n$_ ";$f=1}elsif(!/^New:/ && $f==1){print "$_ "}' inputfile

A different logic:
perl -ne 'chomp; if(/^New:/){print "$x\n"; $x="$_...
1,565
Posted By complex.invoke
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
1,565
Posted By ctsgnb
awk 'NR>1{gsub(/^New/,"\nNew")}END{printf "\n"}1'...
awk 'NR>1{gsub(/^New/,"\nNew")}END{printf "\n"}1' ORS=' ' infile
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 12:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy