Find error doing my head in !
Hi there,
Hopefully someone can help with this which his really doing my head in. I have in a script .. Code:
while read line find: missing argument to `-name' When I run the find command on its own outside of the script, it works fine. Any idea's ? Many thanks |
Perhaps you need to specify the full path to files_list.tmp?
BTW- When posting code please include between [CODE][/CODE] tags. |
nope, that didn't fix it
(CODE fixed) thanks |
can you please run it like so so we can get a display of what is going on:
Code:
echo XHOME = $XHOME |
The $line & $CFXHOME are being picked up fine.
It just doesnt seem to line the -name from within the while loop :( + echo /home/test/gp/efin /home/test/gp/efin + read line + echo line = acts035.fmt line = acts035.fmt + find /home/test/gp/efin -type f -name acts035.fmt + grep -v fixes + read line + echo line = cfacs.mcs line = cfacs.mcs + find /home/test/gp/efin -type f -name cfacs.mcs + grep -v fixes + read line + echo line = cfxdkerf.sqd line = cfxdkerf.sqd + find /home/test/gp/efin -type f -name cfxdkerf.sqd + grep -v fixes + read line + echo line = mandate.sqd line = mandate.sqd + find /home/test/gp/efin -type f -name mandate.sqd + grep -v fixes + read line + echo line = pops005.fmt line = pops005.fmt + find /home/test/gp/efin -type f -name pops005.fmt + grep -v fixes + read line + echo line = reqs001.fmt line = reqs001.fmt + find /home/test/gp/efin -type f -name reqs001.fmt + grep -v fixes + read line + echo line = reqs025.fmt line = reqs025.fmt + find /home/test/gp/efin -type f -name reqs025.fmt + grep -v fixes + read line + echo line = s_postcode.sqd line = s_postcode.sqd + find /home/test/gp/efin -type f -name s_postcode.sqd + grep -v fixes + read line + echo line = wndskdob.sqn line = wndskdob.sqn + find /home/test/gp/efin -type f -name wndskdob.sqn + grep -v fixes + read line + echo line = line = + find /home/test/gp/efin -type f -name + grep -v fixes find: missing argument to `-name' + read line ++ date +%Y-%m-%d + DATE=2014-06-12 |
ahh, i've fixed it.
I had a blank line at the bottom of my input file. Thanks for reading |
All times are GMT -5. The time now is 09:13 PM. |