yntax error: unexpected end of file
Hi Dears
I write a linux script for apply an programm to 1456 files there is follow: counter=1 var=1456 while [ $counter -le $var ]; do asd=$(head list.txt -n $counter | tail -n 1) echo "$counter = $asd " ls -l $ias >> asd.txt ls -l $as > ./results/result$counter.txt ./read_wrf_nc -EditData SNOW $as > ./results/result$counter.txt echo " yes" let counter++ done echo "-------------------------" echo " done all " but when I run it give this error: ./script.txt: line 22: syntax error: unexpected end of file The line 22 is an emty line in end of script Please help me Thanks Sima |
Code:
1 counter=1 Anyway, the script works fine, except for the commands made by the executable called in line 8, which I of course can't replicate, have no WRF installed. May be an error in " read_wrf_nc " ? ..... 'ls test-script-directory' asd.txt list.txt read_wrf_nc* results/ script.txt ..... |
These 2 vars are not assigned before use
$ias $as Also, I'd write ./results/result$counter.txt as ./results/result${counter}.txt to be on the safe side |
All times are GMT -5. The time now is 08:58 AM. |