Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: losttouch
1,141
Posted By complex.invoke
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
tr '\n' ' ' < infile | sed 's/ New/\nNew/g'
1,141
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
1,141
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