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:


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


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

Fatal error: Call to undefined function sqlite_open() in /membri/giacobbe85/include/ on line 324