![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding & Moving Oldest File by Parsing/Sorting Date Info in File Names | nikosey | Shell Programming and Scripting | 6 | 07-30-2008 10:46 PM |
| How to read element of line of file | ahjiefreak | High Level Programming | 1 | 04-20-2008 03:21 PM |
| file moving based on file content | melvyn.cochrane | Shell Programming and Scripting | 12 | 02-15-2008 06:10 AM |
| How to use grep to check NAN value and nonexistense element in file | ahjiefreak | Shell Programming and Scripting | 1 | 12-17-2007 04:35 AM |
| moving a file? | Holistic | UNIX for Dummies Questions & Answers | 1 | 02-20-2003 07:47 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
echo "Enter dir name frm whr u wanna search:--give the full path--"
read dir if [ ! -d "$dir" ]; then echo "Dir not found!" exit fi echo "Enter destination dir path:" read destdir_nm for FILE in `find $dir -name *.xml` do if [ -f $FILE ] && [ `cat $FILE | grep "<REFERENCE></REFERENCE>" | wc -l` -gt 0 ] || [ `cat $FILE | grep "<REFERENCE />" | wc -l` -gt 0 ] then echo "! File Found: $FILE " mv $FILE $destdir_nm fi done |
|
||||
|
I got this below error while running this script...
Enter dir name frm whr u wanna search:--give the full path-- /dfds03/editst6/karan Enter destination dir path: /dfds03/editst6/guru find: 0652-009 There is a missing conjunction Can you tell what the issue is... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|