[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Linux command line

Posted on 2007-10-10
7
Medium Priority
?
312 Views
Last Modified: 2013-12-16
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?

0
Comment
Question by:pda4me
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:Rance_Hall
ID: 20050083
you sure it doesnt need to be "while read $file"?

0
 

Author Comment

by:pda4me
ID: 20050296
I tried that and it gives the same error...any ideas?
0
 
LVL 85

Expert Comment

by:ozo
ID: 20051109
which shell are you running it under?
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 

Author Comment

by:pda4me
ID: 20051120
csh
0
 
LVL 85

Expert Comment

by:ozo
ID: 20051132
Did you try to run it in csh/tcsh instead of sh/bash/ksh
0
 
LVL 85

Accepted Solution

by:
ozo earned 2000 total points
ID: 20051167
csh uses a different syntax for its while command
the syntax you used is for sh
0
 

Author Comment

by:pda4me
ID: 20051594
Awesome, that did the trick...thanks!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question