…with an open minded approach

text manipulation: lines to columns and other goodies

Have a look at the power of the “paste” comand – it just solves a bunch of situations with ease, and its litle known… transpose pair a lines into 2 columns, etc…

 

Have a look to these examples to get an idea of “paste” power…

 

http://www.theunixschool.com/2012/07/10-examples-of-paste-command-usage-in.html

Advertisements

3 responses

  1. Thanks for sharing this.

    I did not know that -d could take more than one delimiter.

    $ paste -d ‘:,’ – – – < file1
    Linux:Unix,Solaris
    HPUX:AIX,

    $ paste -d':,|' – – – – < file1
    Linux:Unix,Solaris|HPUX
    AIX :,|

    January 21, 2015 at 21:02

  2. Pingback: text manipulation: lines to columns and other goodies | pseudo-scripter

  3. Reblogged this on pseudo-scripter and commented:
    Awesome post from Zipzap

    January 21, 2015 at 21:04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s