Search Results

Search: Posts Made By: MadeInGermany
16,135
Posted By MadeInGermany
Another shell solution: var=$( while read L; do...
Another shell solution:
var=$( while read L; do printf "%s'%s'" "$sep" "$L"; sep=", "; done < file )
Translating to awk saves the explicit loop:
var=$( awk '{printf "%s'\''%s'\''",sep,$0; sep=",...
16,135
Posted By MadeInGermany
and the Oscar goes to :b:
and the Oscar goes to

:b:
16,135
Posted By MadeInGermany
Unix sed: sed -e ':L1' -e N -e '$!bL1' -e...
Unix sed:
sed -e ':L1' -e N -e '$!bL1' -e "s/.*/'&'/;s/\n/','/g" fileRead the whole file into the memory buffer, then
insert a ' at the beginning and end of the buffer,
replace all intermediate \n...
Showing results 1 to 3 of 3

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