Aqui está uma maneira:
$ cat inf
your-email your-order-id PayPal-transaction-id your-first-name your-second-name
[email protected] 12345 54321 sooky spooky
[email protected] 23456 23456 kiki dee
[email protected] 34567 76543 cheeky chappy
$ cat mkf.sh
awk '
BEGIN {
print "---\n"
}
NR == 1 {
nc = NF
for(c = 1; c <= NF; c++) {
h[c] = $c
}
}
NR > 1 {
for(c = 1; c <= nc; c++) {
printf h[c] ": " $c "\n"
}
print ""
}' inf
$ ./mkf.sh inf
---
your-email: [email protected]
your-order-id: 12345
PayPal-transaction-id: 54321
your-first-name: sooky
your-second-name: spooky
your-email: [email protected]
your-order-id: 23456
PayPal-transaction-id: 23456
your-first-name: kiki
your-second-name: dee
your-email: [email protected]
your-order-id: 34567
PayPal-transaction-id: 76543
your-first-name: cheeky
your-second-name: chappy