i trying remove leading whitespace awk output. when use command, leading whitespace displayed.
diff test1.txt test.txt | awk '{print $2}' output: asdfasdf.txt test.txt weqtwqe.txt
how can remove leading whitespace using awk?
thanks in advance
if want print lines $2 exists can conditionally on number of fields
awk 'nf>1{print $2}'
will do.
Comments
Post a Comment