LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2010, 09:33 PM   #1
GreYFoXGTi
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
Question Terminal commands working in terminal but not in a script


Code:
cd /tw
./DDRace_Stable -f CFG_xyz_ddrace3.cfg
those 2 lines run fine if i run them in the terminal 1 by 1
but if i put them in say qwe.sh and of course make the permissions executable
they don't
DDRace_Stable doesn't find CFG_xyz_ddrace3.cfg

i also tried giving the full path for both DDRace_Stable and the CFG
Solution:
Code:
#!/bin/bash
cd /tw
while [ 1 ]
do
./DDRace_Stable -f CFG_xyz_ddrace3.cfg
done
exit 1

Last edited by GreYFoXGTi; 08-03-2010 at 10:31 PM.
 
Old 08-04-2010, 09:36 AM   #2
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
Perhaps you're interested in an other way of solving the problem. It is about the quotes missing in the script. Adding two double-quotes will also make your script working:

Code:
cd /tw
./DDRace_Stable "-f CFG_xyz_ddrace3.cfg"
 
  


Reply



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
Commands are not working in terminal!!! Damn small linux Ineedwords1121 Linux - Newbie 13 12-19-2008 07:46 AM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM
Help to create a script to open a terminal and run commands in it. Brian1 Linux - Software 6 02-07-2005 06:46 PM
certain commands aren't working on the terminal bariswheel Mandriva 4 12-22-2004 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:53 AM.

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