Archive for December, 2015

Unix:- Remove space from the output command

Posted: December 22, 2015 in UNIX

cat yyyymmddprefixandcat.sh | wc -l
Result:- 16

Now to remove the space from the output use below
cat yyyymmddprefixandcat.sh | wc -l | tr -d ” ”

Using AWK

wc -l yyyymmddprefixandcat.sh | awk ‘{print $1}’

Result:-

16

Using CAT
cat yyyymmddprefixandcat.sh | wc -l

Result:-
16