Search Results

Search: Posts Made By: Jackceasar123
2,718
Posted By Jackceasar123
Thanks All.. But I could get it in one line cmd...
Thanks All.. But I could get it in one line cmd ...

sed ':a;N;$!ba;s/\n2/~~~~~/g' drc_file.txt | sed ':a;N;$!ba;s/\n/ /g' | sed 's/~~~~~/\n2/g' > test.txt
2,718
Posted By Jackceasar123
Thanks for the code. But I have other valid...
Thanks for the code. But I have other valid records with NF =9, that should not be joined with this. So when I ran your cmd, lines after the bottom most line in my prev note gets appended with next...
2,718
Posted By Jackceasar123
@derekludwig - Yes , it is fixed number of fields...
@derekludwig - Yes , it is fixed number of fields & new line at end of line

---------- Post updated at 11:24 PM ---------- Previous update was at 11:23 PM ----------

Source:- ...
2,718
Posted By Jackceasar123
Joining broken lines and removing empty lines
Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char.
thanks...
Showing results 1 to 4 of 4

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