On Sunday 08 April 2007 20:49:02 James Hatridge wrote:
> Hi all,,
>
> I'm not sure if this is a grep or awk question. I have a file with many
> records of 4 lines each in it. Like this:
>
> 1
> 2
> 3
> 4
> 1
> 2
> 3
> 4
> etc, etc
>
> I need the file to look like this:
>
> 1 tab 2 tab 3 tab 4
> 1 tab 2 tab 3 tab 4
> etc etc....
>
> How can I do this?

Perhaps with bash?

#!/bin/bash

while read line1; do
        read line2;
        read line3;
        read line4;
        echo -e "$line1\t$line2\t$line3\t$line4" >> outputfile
done < testfile

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to