Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-15-2004, 09:53 PM   #1
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
command not found (My shell script)

What's up? Everyone!

I have discovered "Mondo" is the best backup solution for me.It really works great for me.So,I wrote a shell script (Not I wrote really,I copy a tutorial's script) to be the cron job and work for me at midnight.The script is as follows:

mkdir -p /home/mondo/`date +%A` &&
mondoarchive -Oi -d /home/mondo/`date +%A` -E /home/mondo
The first line works great.However,I found errors at the second line.First of all, my log file indicated that mondoarchive,command not found.I have checked spelling and it's correct.Additionally,I have indeed installed this program.So it shouldn't be like that.
Secondly,log file always indicated that -E command not found.-E means exclude in mondo script.Command not found???

Any suggestions are appreciated!
Old 05-15-2004, 10:23 PM   #2
LQ Guru
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 47
Is it in /usr/bin or /usr/local/bin? If not, you probably dont have it in your path. Try doing a locate mondoarchive and finding the binary, then providing the full path to it in the script.
Old 05-15-2004, 10:47 PM   #3
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Thanks.I think you are right.But I have to test this script next Sunday because I've back it up today...
Old 05-15-2004, 11:14 PM   #4
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,894

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
The reason -E is giving a 'command not found' error is that bash is trying to expand the command, and bash does not have a -E option. To prevent bash from trying to expand the -E option, try enclosing -E in double quotes "-E" and let mondo expand the command.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
running shell script: command not found tripat Red Hat 3 04-14-2010 01:21 PM
Executing a shell script command!! vishamr2000 Programming 4 08-15-2005 12:33 AM
Command not found error - difference in shell? aw_wolfe Linux - Newbie 6 04-20-2005 04:49 PM
Command in shell script Grassie Coetzee Linux - Software 1 03-13-2005 11:42 AM
Shell script login command? chup Linux - General 3 08-24-2003 06:43 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration