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
Will solaris commands work on linux machine sanapart Linux 4 05-12-2008 04:35 AM
My script does not work - could you pls help? BearCheese Shell Programming and Scripting 1 06-29-2007 02:12 AM
Why do basic unix commands not work in BASH PixelLover UNIX for Dummies Questions & Answers 10 05-23-2006 12:10 PM
how do I get my arrow keys to work for looking thru my PREVIOUS UNIX COMMANDS spotnis UNIX for Dummies Questions & Answers 11 09-13-2005 10:22 PM
sed script. How does it work? billy5 Shell Programming and Scripting 2 09-02-2005 01:45 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-14-2006
Registered User
 

Join Date: Nov 2006
Posts: 2
Red face Script doesn't work, but commands inside work

Howdie everyone...

I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*

My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it showed [Done]
But in the same directory that I executed the SCRIPT, I tried to execute the COMMANDs by themselves. They work!!! All files are removed accordingly.

Hopefully someone can help with this problem.

Many thanks in advance
Reply With Quote
Forum Sponsor
  #2  
Old 11-14-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,693
Quote:
Originally Posted by cheongww
Howdie everyone...

I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*

My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it showed [Done]
But in the same directory that I executed the SCRIPT, I tried to execute the COMMANDs by themselves. They work!!! All files are removed accordingly.

Hopefully someone can help with this problem.

Many thanks in advance
In which directory did you execute this script ? The problem could be the relative path construct ../..
Reply With Quote
  #3  
Old 11-14-2006
Registered User
 

Join Date: Nov 2006
Posts: 2
Thumbs up Thank You!!!

Thanks vino. I replaced the relative path with absolute path and it works!!!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0