The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sigempty what means? Puntino UNIX for Dummies Questions & Answers 1 04-28-2008 09:44 AM
what does all this statments means? vishalpatel03 Shell Programming and Scripting 1 01-09-2008 11:43 AM
what it means? rraajjiibb UNIX for Dummies Questions & Answers 4 08-31-2004 02:36 PM
What does ##* means yeheyaansari UNIX for Advanced & Expert Users 2 02-14-2002 09:39 AM
what is means by tar xvr - E-Quality UNIX for Dummies Questions & Answers 2 09-24-2001 10:48 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 10-05-2007
redlotus72 redlotus72 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 69
no space : What this means?

movePSOrders.sh[35]: no space

for file in $(find $INPUTDIR -type f -mtime +2) ; do
#echo $file
if test -f $file; then
mv $file $OUTPURDIR
fi
done


Same code is working in other env,
I don't know why I am getting

movePSOrders.sh[35]: no space
  #2 (permalink)  
Old 10-05-2007
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
redundent check

first, your code is redundant..
find is finding files and you are again checking if it is a file

the shorter one will be

find $INPURDIR -type f -mtime +2 -exec mv {} $OUTPUTDIR \;


cheers,
Devaraj Takhellambam
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:16 AM.


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