user3687207
user3687207

Reputation: 11

Unix Text File Manipulation

I would like to change the first text file to the second:

1st: Input:

"127.0.0.1"
"Local"
"abph64ct"
"142.239.85.245"
"Omnipro"
"Abbs1"

2nd: Desired Output:

"127.0.0.1" "Local" "abph64ct"
"142.239.85.245" "Omnipro" "Abbs1"

Basically, I would like three fields on each line. This example only shows two 'iterations'; there could be many more.

Upvotes: 0

Views: 138

Answers (1)

dogbane
dogbane

Reputation: 274768

Use the paste command as shown below, to place three fields on each line:

$ paste -d " " - - - < file
"127.0.0.1" "Local" "abph64ct"
"142.239.85.245" "Omnipro" "Abbs1"

Upvotes: 2

Related Questions