Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-09-2003, 08:45 PM   #1
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Rep: Reputation: 15
"batch script": writing and running

As is: how can I write and run a "shell" script...and what importance is it that it is a "shell" script?...

Old 09-09-2003, 09:13 PM   #2
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
learn shell programming, and an importance i can think of is that it will make you automate tasks...
no one can sit here and tell you how to do it, cause they are all different regarding what you want it for...
Old 09-09-2003, 09:35 PM   #3
LQ Guru
Registered: Mar 2003
Location: New Jersey
Distribution: Arch Linux
Posts: 1,445

Rep: Reputation: 47
To begin, you can just use the normal commands you know (ls, rm, mv, cp).

Just write a list of commands in a text file, and there's a script.
Old 09-09-2003, 11:08 PM   #4
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
ahh...and to execute a script in a console...would i have to type anything special, as "run 'scriptname'" or something of the sort?

btw thank you for the answer contrasutra.

noticed the arch-linuxes as your distro, yay, cant wait til im as wonderful enough to use the distro myself
Old 09-09-2003, 11:13 PM   #5
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
First type

echo $PATH

to find a list of directories in which you can run your script from (there separated by colons)

Then just pop your script in one of these directories

Then run your script with

bash path_to_script
Old 09-09-2003, 11:22 PM   #6
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
that does it for me, thanks for all the help...if you happen to drop by and see this...could you leave any fave scripting sites..of any sort just for study by example? :-D



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 script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM
Bash Script: Problem running variable command containing "" Paasan Programming 2 01-21-2004 01:45 AM
Writing shell script called "convert" bluewolf Programming 3 02-04-2003 10:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:21 PM.

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