I\'m using awk \'{gsub(/^[ \\t]+|[ \\t]+$/,\"\"); print;}\' in.txt > out.txt to remove both leading and trailing whitespaces.
awk \'{gsub(/^[ \\t]+|[ \\t]+$/,\"\"); print;}\' in.txt > out.txt
The problem is the output f
This command works for me:
$ awk '{$1=$1}1' file.txt