Search Results

Search: Posts Made By: satir
5,753
Posted By junior-helper
This (cheap) trick might work sed 's/;/ /3' file
This (cheap) trick might work sed 's/;/ /3' file
5,753
Posted By Skrynesaver
perl -ne'chomp;@r=split/;/,$_;print...
perl -ne'chomp;@r=split/;/,$_;print join(";",@r[0..2])," $r[3]\n";' tmp/tmp.dat
3,774
Posted By MadeInGermany
The thread title asks for a sed solution. Here is...
The thread title asks for a sed solution. Here is one:
sed '
/^ /{H;x;s/\n */ /;$p;x;d;}
x
1d
${p;x;}
' file
3,774
Posted By balajesuri
Here's a pe(a)rl ;-) perl -lne...
Here's a pe(a)rl ;-)

perl -lne 'chomp;if($.==1){$p=$_;next}; if($_=~/^\s+(.*)$/){$p = $p." ".$1}else{print $p; $p=$_} END{print $p}' file
Showing results 1 to 4 of 4

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