IMC!


Contents


Photos

 







Browsing around...
News  News Links  Links Blog  Blog Italiano  Español 
01 - Introduction

Previous page
 | 

The bash is the main command line interface in Linux systems. These articles don't want to explain it totally, but simply to present its fundamental aspects synthetically and schematically, focusing mainly on the script realization. It's assumed that the reader already knows at least basically Linux systems. All the scripts were tested on Ubuntu / Kubuntu distributions.

When the bash is started (typically at the computer boot), 5 configuration files are loaded:
  1. /etc/profile: it contains the global settings for all the command lines available in the operating system.
  2. /etc/bashrc: it contains global settings for the bash shell.
  3. ~/.bash_profile: it contains the personal settings for each user in the bash.
  4. ~/.bashrc: further personal settings per each user, among which the boot and login scripts.
  5. ~/.bash_logout: logout procedure per each user.
Our first script
A script is a file containing a series of commands for the bash interpreter, organized for executing complex operations.
A script begins usually with a line containing:

#!/bin/bash

and has a .sh extension. It can be executed by writing:

./script_name.sh

and contains three elements:
  1. Comments: realized by writing a hash (#) at the beginning of the line.
  2. Operating system commands: for example grep, cat, etc.
  3. Shell commands: constructs such as if, while, etc.

Previous page
 | 







Comments

No comment present!

Write a comment

You can write here a comment to the article you've just read. Smiles, links and images are not allowed. The maximum comment length is 4000 characters. Please be polite, all the offensive messages will be deleted.

Your comment (lascia bianco!):
Uses (max 25 characters, required)
Web site (max 255 characters, optional)
e-Mail (max 255 characters, optional, will not be published) Your opinion (lascia bianco!):
Comment (max 4000 characters, required):





Valid HTML 4.01 Transitional
E-Mail - 35.13 ms

Valid HTML 4.01 Transitional