LinuxQuestions.org
Help answer threads with 0 replies.
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 01-06-2004, 12:57 PM   #1
Thomzmaster
LQ Newbie
 
Registered: Dec 2003
Posts: 8

Rep: Reputation: 0
Scripts


Hi, I was just wondering if there's a quick way to make scripts of shell commands, just to make stuff like going to a certain directory less tiresome. Any suggestions are welcome, thanks -- Thom
 
Old 01-06-2004, 12:59 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Code:
#!/bin/bash
#
<commands>
Use the above to make small scripts and make it executable < chmod +x [filename] >or you can create aliases if they are smaller one line type commands you use, etc.
 
Old 01-06-2004, 01:20 PM   #3
Thomzmaster
LQ Newbie
 
Registered: Dec 2003
Posts: 8

Original Poster
Rep: Reputation: 0
one more question...

cool, thanks alot, say I've done a change directory command, how do i get the terminal to stay open once it's gone to that directory??
 
Old 01-06-2004, 01:53 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: one more question...

Quote:
Originally posted by Thomzmaster
cool, thanks alot, say I've done a change directory command, how do i get the terminal to stay open once it's gone to that directory??
Well, with a script like that, you need to run it from a terminal as it sounds like your trying to run it from an icon or link, etc.
 
Old 01-06-2004, 01:57 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Jumping to conclusions here :}

You've put a link to the script on your desktop?
If so, you'll have to do it slightly differently.

Instead of making a link to your script, make
one that opens an xterm, and pass your script
to it as a parameter, like in
xterm -title "My Script" -sl 6000 +ls -e my_script.sh




Cheers,
Tink


[edit]P.S.: Darn you and your fast typing tricky ;} [/edit]

Last edited by Tinkster; 01-06-2004 at 02:00 PM.
 
  


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
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 03:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM

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

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