|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Code:
case "$inputs" in
sapte)
find /pools/home_unix/sapte/work/models/model -name "*.xml" exec rm -i {} \;;
ckm1)
find /pools/home_unix/ckm1/work/models/model -name "*.xml" exec rm -i {}
\;;I am getting error like as below. Code:
./menu1.sh: line 144: syntax error near unexpected token `)' ./menu1 .sh: line 144: `ckm1)' Thanks.. prashant Last edited by Scott; 07-30-2012 at 06:03 AM.. Reason: Please use code tags |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
You need an extra ; because find needs one, and the case needs two. Code:
blah) find ..... {} \; ;;I prefer to put the ;; on a new-line: Code:
case "$inputs" in
sapte) find /pools/home_unix/sapte/work/models/model -name "*.xml" exec rm -i {} \;
;;
ckm1) find /pools/home_unix/ckm1/work/models/model -name "*.xml" exec rm -i {} \;
;;
esacLast edited by Scott; 07-30-2012 at 06:07 AM.. Reason: Typo |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Scott thanks for reply now i am geting another error which is as below. Code:
enter option for checking specific user xml files to delete sapte,ckm1,mdubey,hchede,amukherjee,skedar,averma,dbhatt,vmuthu,stiwari sapte find: bad option exec find: [-H | -L] path-list predicate-list Hit <ENTER> to continue: thanks prashant Last edited by Scott; 07-30-2012 at 06:14 AM.. Reason: Please use code tags |
|
#4
|
||||
|
||||
|
Missing - for the exec option. Code:
... -exec ... |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
ya scott it is working fine thanks for the same...prashant..
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find from file and replace with specific text | libras | Shell Programming and Scripting | 5 | 05-09-2012 06:26 AM |
| Need an awk for a global find/replace in a file, specific column | jclanc8 | Shell Programming and Scripting | 3 | 03-22-2010 11:20 AM |
| Find and replace a string a specific value in specific location in AIX | techmoris | Shell Programming and Scripting | 5 | 03-11-2010 06:24 PM |
| Error: Find the pattern in the file and replace | shreekrishnagd | Shell Programming and Scripting | 9 | 03-04-2009 04:04 AM |
| Ignore case sensitive in Case Switch | annelisa | Shell Programming and Scripting | 1 | 07-13-2006 04:36 AM |
|
|