I have a file with static format like below.
column|Data
Example:
Name|Joe
Surname|Robinson
Country|US
Gender|Male
I am expecting below output using a ksh script
Name|Surname|Country|Gender
Joe|Robinson|US|Male
Please suggest what approach I can use.
You expect a
kshsolution.As
kshissh-compatible ashscript is fitting too. Additionally it maximizes portability:If you prefer to use a pipe the suggestion of @Fravadona is the script for you: