If you want to preserve the spacing in between the fields that are going to be preserved, you might as well do:
<file awk '{sub(/^[[:blank:]]*([^[:blank:]]+[[:blank:]]+){3}/, ""); print}'
(though note that not all awk
implementations support {3}
even though it's POSIX).
That is use a regular expression that matches the first 3 fields.
Or simply use sed
to do that:
<file sed 's/^[[:blank:]]*\([^[:blank:]]\{1,\}[[:blank:]]\{1,\}\)\{3\}//'
Another approach with sed
is:
<file sed 's/[^[:blank:]]\{1,\}[[:blank:]]*/\
/3; s/.*\n//'
Which replaces the 3rd field and the blanks following it with a newline and then deletes everything up to that newline.
Those assume that all the lines in the input have at least 4 fields.
On a a b c d <tab>e f <nl>
input, that will give d <tab>e f <nl>
output.
print $i
toprintf $i" "
. Full command looks likeecho vddp vddpi vss cb0 cb1 cb2 cb3 ct0 ct1 ct2 ct3 | awk ' { for (i=3; i<=NF; i++) printf $i" " }'