Artificial intelligent assistant

awk command to add header, footer along with fixed length file I could convert delimited file to fixed length file with the below command: awk -F'|' '{print $1$2$3}' file9 But i would also like to add Header and Footer in addition File9 - 123|4567|890| Expectation - Header 1234567890 Footer

Adding a header or a footer in awk can be done with a BEGIN and an END block:


awk -F\| 'BEGIN {print "header"}
{print $1$2$3}
END { print "footer" }' file9


I don't really see how `print $1$2$3` converts your file to a "fixed length file", but this will give you the header and footer.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 015dfbfd756a29277327ad5c68329d1e