The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-22-2008
Niroj Niroj is offline
Registered User
  
 

Join Date: Aug 2008
Location: Bangalore, INDIA
Posts: 55
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
  #2 (permalink)  
Old 08-22-2008
karansachdeva karansachdeva is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 39
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...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0