-   Linux - Newbie (
-   -   creating a batch file (

barathan 06-14-2012 01:36 AM

creating a batch file
Hi friends,

I'm a newbie in LINUX OS. need some help here. i am figuring out of a way to create a batch file in LINUX just like how i did in windows. i want to run two python scripts whenever i run this batch file.


TobiSGD 06-14-2012 02:31 AM

Satyaveer Arya 06-14-2012 02:54 AM

There is no batch file in linux. You have to use any editor like vim or gedit, anyone and start with the first line using-
and then you can write in the file. Give the file executable permission and then you can execute the file.
And this is what we call shell scripting. If you want the script to run at booting time you can put the file in /etc/rc.local/ directory.

pan64 06-14-2012 03:36 AM

sorry guy, that is #!/bin/bash

Satyaveer Arya 06-14-2012 04:46 AM

Ohhh, yeah I should make that correct. :)

David the H. 06-14-2012 06:47 PM

The *nix shell scripting languages are much more powerful than simple batch files. They take longer to learn, but allow you to do more, more easily, once learned.

Here are a few useful bash scripting references:

Start with the BashGuide, or perhaps if you want a hands-on walk-through example. They should give you the basics you need to know.

chrism01 06-14-2012 06:53 PM

If you want it to run automatically at certain times, you'll need to add it (the bash script) into cron

All times are GMT -5. The time now is 02:47 AM.