nbroffilles = ls -l *.Z | wc -l
echo $nbroffiles
The above script does not return the number of *.Z files in the directory that I run the script from. The error message I get is:
nbroffiles: not found
IF I run the command - ls -l *.Z | wc -l from the command line it returns a number equal to the number of *.Z files in the directory I'm in.
How can I deposit this number into a variable in a ksh script?
echo $nbroffiles
The above script does not return the number of *.Z files in the directory that I run the script from. The error message I get is:
nbroffiles: not found
IF I run the command - ls -l *.Z | wc -l from the command line it returns a number equal to the number of *.Z files in the directory I'm in.
How can I deposit this number into a variable in a ksh script?