Tuesday, April 14, 2009

Windsurfing Lessons In Colorado

Creating a bash file (batch) for Linux Ubuntu

I'm not very expert in Linux, but there are certain things you need to do from time to time and do not post a little more on the subject.

In this post I explain how to create a bash file (batch for Windows users).

1. Create a new file in any folder where you want to run our bash.

2. Open this file with any text editor (by default it opens with my Ubuntu gedit).

3. Add file to start the next line

# / bin / bash

4. Following this line we add all the lines we want to run the console automatically.

For my example, I am compiling 3 files C language

# / bin / bash
consumidor.c gcc gcc-o
consumer or producer
productor.c-gcc-o monitor monitor.c

5. We keep our file and we'll give you a console for the respective periods of execution. To do this run the following command: sudo chmod 777

filename

We asked the Administrator password and when entered correctly will allow our bash is executed.

6. To run use the following command:

. / Filename

In short bash learned about creating files that automatically execute commands in console and learned to grant execute permissions I hope they serve at some time like me, greetings!

0 comments:

Post a Comment