LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2007, 08:02 PM   #1
wahaha
Member
 
Registered: Jul 2006
Posts: 130

Rep: Reputation: 15
Write a script to run several commands ???


Hi,

I am using fedora distribution. There are few commands i have to enter to for a project involved such as below:

# echo 0 > /proc/sys/net/ipv6/conf/eth0/forwarding
# echo 1 > /proc/sys/net/ipv6/conf/eth0/autoconf
# echo 1 > /proc/sys/net/ipv6/conf/eth0/accept_ra
# echo 1 > /proc/sys/net/ipv6/conf/eth0/accept_redirects


May I know is there possible to write a script to run the several commands in terminal if I don't want type the command line by line?

If yes, can you tell me how to do so? Because I have never do so before.

Thank you.
 
Old 04-13-2007, 08:20 PM   #2
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
Just copy those lines into a new file, removing the leading #.
then use chmod +x to give it execute permission.

That should be about it.
 
  


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
Run bash commands script as cron anjanesh Linux - General 4 04-03-2007 06:25 AM
Help to create a script to open a terminal and run commands in it. Brian1 Linux - Software 6 02-07-2005 06:46 PM
Script to Run the Same Commands on a List of Files Chryzmo Programming 1 10-03-2004 08:34 AM
Creating a script to run two commands anjaan Programming 11 06-15-2004 02:51 AM
run 2 commands in a script ddpicard Linux - General 10 06-13-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:32 PM.

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