LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 01: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, 01:59 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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, 02: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, 02:53 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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, 02:57 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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 03:00 PM.
 
  


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


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