Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: losttouch
Posted By complex.invoke
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
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
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="$_...
Showing results 1 to 3 of 3


Featured Tech Videos

All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy