I execute a script that splits a big file into little files. Immediately afterwards I ask if (-f *filename) then ....Sometimes the script doesn't finish so the if doesn't work. I tried sleep but that doesn't solve the problem.My script: split -l $number_lines - file2 < file1 >& /dev/null &How should i use 'wait'? Thank you! 
How to wait until script ends - csh?
linux;shell;csh