×
UNIX.COM Login
Username:
Password:  
Show Password






👤


concatenate lines using shell scripting

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member protocomm Regarding:
concatenate lines using shell scripting.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old 09-06-2009
protocomm protocomm is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 27 December 2015, 12:35 PM EST
Posts: 310
Thanks: 35
Thanked 25 Times in 25 Posts
perhaps.....bur certainly better....

Code:
awk '{if($0 !~ /=/) ORS=""}{if($0 ~/=/) ORS="\n"} {print}' | sed -e 's/=//g' -e 's/,$//g' file