Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

move line bash script

9 views
Skip to first unread message

bishop...@gmail.com

unread,
Jun 18, 2015, 2:36:46 PM6/18/15
to
greetings i have a file like this

abc/qwe/123/ert
Jun 18 2015 13:24:03 EDT
adc/gwe/153/poi
Jun 18 2015 14:24:03 EDT
etc...

i want to format it like this like a csv comma separated list.

abc/qwe/123/ert,Jun 18 2015 13:24:03 EDT
adc/gwe/153/poi,Jun 18 2015 14:24:03 EDT

suggestions please
Thanks again,.

m4n

unread,
Jun 19, 2015, 2:47:56 AM6/19/15
to
On Friday, 19 June 2015 00:06:46 UTC+5:30, bishop...@gmail.com wrote:
> greetings i have a file like this
>
> abc/qwe/123/ert
> Jun 18 2015 13:24:03 EDT
> adc/gwe/153/poi
> Jun 18 2015 14:24:03 EDT
> etc...
>
> i want to format it like this like a csv comma separated list.
>
> abc/qwe/123/ert,Jun 18 2015 13:24:03 EDT
> adc/gwe/153/poi,Jun 18 2015 14:24:03 EDT

sed 'N;s/\n/,/' $file

Jemshad
0 new messages