LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-27-2004, 12:53 AM   #1
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Rep: Reputation: 30
Trying to create a startup script for tuxnes emulator


Im trying to create a startup script for the tuxnes emulator so far i have this

Quote:
#!/bin/bash


echo "Which game would you like to play"


read X

if [ -n "$X"];

then


tuxnes --renderer=auto --geometry=1024x768 --format=mu8 --sound=/dev/dsp --soundrate=44100 --js1=/dev/js0 $X;

else

echo "no such file found"
fi
when i run ./tuxnes.sh

i get the prompt that ask for "which game you would like to play"
I then enter Metroid.nes and soon after I pres enter i recieve this error

./tuxnes.sh: line 9: [: missing `]'
no such file found

Im very new to writing scripts. Can someone tell me what is wrong with this one. Line 9 seems ok to me.????????



*****UPDATE I finally figured it out ***************
There is no space between "X" and ] in [ -n "X"] thats why it couldnt work ...

Last edited by Kilahchris; 10-27-2004 at 01:02 AM.
 
Old 10-28-2004, 05:27 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
./tuxnes.sh: line 9: [: missing `]'

Wow! That /bin/bash sure is smart :P
 
  


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
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
newbie - how to create a startup script gogogadgetearl Linux - Software 2 10-02-2005 08:14 PM
VICE C64 emulator v1.16 freezes during startup - Ubuntu hoary fif Linux - Games 1 07-06-2005 01:49 PM
Tuxnes and VisualBoyAdvance Problems Optimistic Linux - Software 0 06-21-2004 04:34 PM
Game Genie Codes in TuxNES Bigun Linux - General 4 05-24-2003 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:26 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