Hi gurus,
I have a script in which i m using following line of code
no_record=echo `wc -l filename` | cut -f1 -d" "
while executing the script i getting
ksh: 21466: not found error.
please help me in resolve this issue
Thanks in advance
Manish
no_record=`wc -l filename | cut -f1 -d" " `
now i am not recieving any error but getting blank in the variable.
Hi Manish,
What you are expecting by executing this command...do you need number of lines ?
try this:
records=$(awk 'END{print NR}' file)
no_record=$( wc -l < filename )