Suppose I have a file like this:
$ cat a hello this is a sentence and this is another one
And I want to print the first two columns with so
you can use eval (maybe not the most beautiful with all the escape characters, but it works)
i=15 eval "awk '{printf \"%$i-s%s\\n\", \$1, \$2}' a"
output:
hello this and this