LinuxQuestions.org
Help answer threads with 0 replies.
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 09-09-2003, 09:45 PM   #1
Jalalabee
Member
 
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?...

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

Rep: Reputation: 59
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, 10:35 PM   #3
contrasutra
LQ Guru
 
Registered: Mar 2003
Location: New Jersey
Distribution: Arch Linux
Posts: 1,445

Rep: Reputation: 46
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-10-2003, 12:08 AM   #4
Jalalabee
Member
 
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-10-2003, 12:13 AM   #5
Skyline
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-10-2003, 12:22 AM   #6
Jalalabee
Member
 
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

Wee.
 
  


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

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

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