Language Selection

English French German Italian Portuguese Spanish

6 cool BASH tricks

Filed under
Software

In this article, I'm going to show you a number of simple, yet highly useful tricks that will make your scripting life easier. True, this article may appeal to the more geeky segment of my readers, but there's no reason to stop reading. As usual, I'll try to make my examples as simple and elegant as possible, with screenshots aplenty.

Scripts are an important part of Linux life. They are not necessary, but they can make your life easier by automating tasks. Most users will get along fine without ever bothering with scripts. But if you're lazy and would like your system to work hard rather than the other way around, learning how to write and use scripts is a good exercise.

BASH stands for Bourne Again SHell, the default Linux shell. If you're wondering what shell is, then think of its an interpreter between you (the user) and the system. You type in commands and the systems translates them into actual work. Most of the time, the results of this work are printed on your screen, inside the terminal.

Writing scripts is BASH can be as simple as entering commands one after another, then pasting them all into a text file that will become a script. Still, there are few tricks that can make a lot of difference.

Let's see them.




More in Tux Machines

Open-Source Chat Platform Scrollback Raises $400,000 Seed Round

Scrollback, a free open-source chat platform for online communities, has raised $500,000 Singaporean dollars (about $400,000) led by Jungle Ventures, with participation from Singapore’s National Research Foundation, Crystal Horse Investments, Singapore Angel Network, Roland Turner, and other angel investors. Read more

An open source Christmas with Kano

So this season, what every open sourc-erer wants might just be Kano, a computer kit that comes will all the functions needed to build it and learn to code afterwards. Read more

Particulate sensor developed using open source approach

A New York based start up company has used an open source approach, as well as funding from Kickstarter, to develop AirBeam – a handheld sensor which determines the concentration of particles in the air measuring 2.5µm or less. [...] The AirCasting app and website code is available on GitHub as open source, along with the AirBeam firmware and electronic schematics. The STL files for 3D printing the AirBeam and LiteBeam enclosures can be downloaded from www.shapeways.com. Read more

Brocade relying on open source and 'natural tension' for growth

In line with this prediction, Brocade has been working towards changing its business tactics from being known as a hardware enterprise storage provider to also becoming an additional player in the software-defined network market — one in which rival Cisco has also been dipping its toes. Read more