no space : What this means?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers no space : What this means?
# 1  
Old 10-05-2007
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  
Old 10-05-2007
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

What does it means?

#define abc '\xE8' (7 Replies)
Discussion started by: kamlesh33
7 Replies

2. Shell Programming and Scripting

$? and $# means

what exactly $? and $# means ? (1 Reply)
Discussion started by: mail2sant
1 Replies

3. Shell Programming and Scripting

What does . means?

Hi, I have seen in some ksh script, that we are executing shell scripts inside other shell script as . variable.sh What is . here? Their is space between . and variabloe. And why we are not executing it like ./variable.sh? I know that . signifies current directory , but what its... (2 Replies)
Discussion started by: jatanig
2 Replies

4. UNIX for Dummies Questions & Answers

What means %U

I can not find out what the %U means in the following command: ooffice -calc %U (2 Replies)
Discussion started by: borobudur
2 Replies

5. UNIX for Dummies Questions & Answers

Can you tell me what this means?

Can you please tell me what this means? use grep to find from the file myfile.txt all lines containing the sequence tt but not more 2 ts? I have no idea. (2 Replies)
Discussion started by: rushhour
2 Replies

6. Shell Programming and Scripting

$$ means?

hey, what's $$varname in a script? I used to see $varname only. search on google didn't help. thanks. (4 Replies)
Discussion started by: patiobarbecue
4 Replies

7. UNIX for Dummies Questions & Answers

$? means?

Hi All, Can you please explain wats the meaning of this $? in unix Thanks (2 Replies)
Discussion started by: mathur
2 Replies

8. UNIX for Dummies Questions & Answers

what it means?

I have a command called cd $HDRROOT/release/tools/cfg My query is what it means? tHat is.... $HDRROOT part is not clear. If I put this command it says path not found.... I doubt that $HDRROOT is trying to mean smething I am not clear of. PL help......... (4 Replies)
Discussion started by: rraajjiibb
4 Replies

9. UNIX for Advanced & Expert Users

What does ##* means

Hi In one of the thread I have found echo ${SHELL##*/} Can any of u pls let me know, what is the interpretation for ##* over here? Thanks. (2 Replies)
Discussion started by: yeheyaansari
2 Replies
Login or Register to Ask a Question