LinuxQuestions.org
Review your favorite Linux distribution.
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 05-21-2004, 04:48 PM   #1
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Rep: Reputation: 15
Just to clarify (scripting, bash)


All I need to make a script in bash is the #!/bin/sh header?

I'm confused about several parts. Right now, I'm trying to get Firefox to not open up a profile screen when I click on the icon a second time. People are suggesting their scripts, but I'm not exactly sure how to utilize them. Is there a file somewhere that I need to specify that will call on the script I make?

Also, what are the differences between say "firefox" and "run-mozilla.sh" One has an extension and the other does... but they both begin with the same header and one can be executed and the other can't (or it says I don't have permission).

OK, looking at the two files more, I see that there's a line that refers to "run-mozilla.sh" in "firefox"

I know I should be reading up on books, but I'm more of a hands-on and ask questions type of guy... sorry if this is touched on somewhere and I'm just being entirely noobish

Also... how do I actually MAKE a script? It's not like "right-click, new txt document", I know... Windows has corrupted me. Can I just vi a file that doesn't exist and then save it? Like vi firefox.sh and then save if after I've written to it?

Last edited by onewhoknows; 05-21-2004 at 04:49 PM.
 
Old 05-21-2004, 05:24 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
You can use vi or any straight text editor to create a BASH script. In a gui you can use gedit, kate, or even OpenOffice (although that would be overkill and you would have to save as ASCII text).

After the header you can put most of the commandline commands used interactively. There is lots of info obtainable by
man bash
and http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html and http://www.tldp.org/guides.html#abs
 
Old 05-21-2004, 06:12 PM   #3
onewhoknows
Member
 
Registered: May 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by RobertP
You can use vi or any straight text editor to create a BASH script. In a gui you can use gedit, kate, or even OpenOffice (although that would be overkill and you would have to save as ASCII text).

After the header you can put most of the commandline commands used interactively. There is lots of info obtainable by
man bash
and http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html and http://www.tldp.org/guides.html#abs
Thank you
 
  


Reply


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
BASH If-then-else Scripting Help xianzai Programming 4 10-29-2004 04:09 AM
Bash Scripting Darklight451 Programming 1 10-07-2004 01:48 AM
help with bash scripting spuzzzzzzz Programming 2 09-02-2004 11:42 PM
bash scripting qu drigz Programming 12 06-15-2004 02:09 AM
HELP with BASH scripting atwah Linux - Newbie 6 09-09-2003 01:10 AM


All times are GMT -5. The time now is 08:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration