I have data that looks like this:
01234567 09876544 12345676 34576980
I need to pad this with 11 spaces i.e. my output should look like this:
' 01234567' ' 09876544' ' 12345676' ' 34576980'
How can I do it using UNIX shell scripting?
I'm assuming/guessing that the apostrophes are not supposed to be included in the output.
Standard shell solution, where
If the apostrophes were meant to be included:
You can use Ex-editor (Vi), either by changing the file in-place:
or by parsing the standard input and print it into standard output: