0

the variables line,word,char dont get value!

line= wc -l < $*
word= wc -w < $*
char= wc -m < $*
echo "Number of characters in test.txt is $char"
echo "Number of words in test.txt is $word"
echo "Number of lines in test.txt is $line"
John Kugelman
  • 349,597
  • 67
  • 533
  • 578

1 Answers1

0

You have to wrap the command in $():

line=$(wc -l < $1)
Kokogino
  • 984
  • 1
  • 5
  • 17