Zara
Zara

Reputation: 11

convert one single column to multiple columns in linux

I am trying to convert a single column to multiple columns using grep -v '^\s*$' $1| pr -ts" " --columns $2 but I get this error: pr: page width too narrow

could someone help me with this error?

Upvotes: 1

Views: 791

Answers (1)

Mansoor Khan
Mansoor Khan

Reputation: 11

The question isn't fully clear to me. Maybe you can provide some sample input data as well. If you want to convert 1 column to multiple columns xargs command can be used.

xargs -n10 --> will convert 1 column to 10 i.e. it will take 10 rows and make them one.

BR,

Upvotes: 1

Related Questions