I want to print entire row of file
awk '{print $0}' inputfile
but sometime before every row have space characters. Example:
" HVLR is not in service on AP 54"
How can i print entire row without space characters ?
thanks
I want to print entire row of file
awk '{print $0}' inputfile
but sometime before every row have space characters. Example:
" HVLR is not in service on AP 54"
How can i print entire row without space characters ?
thanks
#delete leading whitespace (spaces, tabs) from front of each line
awk '{sub(/^[ \t]+/, ""); print}'
#delete BOTH leading and trailing whitespace from each line (also removes extra space between fields)
awk '{$1=$1;print}'
//Jadu
If you are not tied to awk. Sed works on removing leading and trailing whitespace.
awk '{print $0 }' inputFile |sed -e 's/^ //g' -e 's/ $//g'
or
sed -e 's/^ //g' -e 's/ $//g' inputFile
Hi...
you can try this..
sed 's/^[ \t]*//' yourfile name
regards
Shahid