Link to home
Start Free TrialLog in
Avatar of pda4me
pda4me

asked on

Linux command line

I am using the following at a Linux command line to search a series of subdirectories and unzip files.  

find incp lotl resi rntl comi -name "*.zip" | while read file ; do unzip -d `dirname $file` $file ; done

This was working fine except that all of a sudden I am getting this error:
while: Expression Syntax.

can anyone suggest what may be going on?

Avatar of Rance_Hall
Rance_Hall

you sure it doesnt need to be "while read $file"?

Avatar of pda4me

ASKER

I tried that and it gives the same error...any ideas?
Avatar of ozo
which shell are you running it under?
Avatar of pda4me

ASKER

csh
Did you try to run it in csh/tcsh instead of sh/bash/ksh
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pda4me

ASKER

Awesome, that did the trick...thanks!