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

Red Hat Summit

  • Red Hat Summit Advocates the Power of Participation
    Red Hat hosted its annual Red Hat Summit customer event June 28-30 at the Moscone Center in San Francisco, with a theme of harnessing the power of participation. Once again, the DevNation developer event, which is the successor to JBoss World, was co-located with Red Hat Summit. For JBoss, 2016 is a particularly significant year as it marks 10 years since Red Hat acquired it. At DevNation, Red Hat announced the new JBoss Enterprise Application Platform (EAP) 7 release, providing new cloud-enhanced capabilities for Red Hat's flagship middleware platform. JBoss is now also working to help enable Java for the container era, with the launch of the MicroProfile Project, an effort to optimize enterprise Java for a microservices architecture. Java wasn't the only focus of DevNation this year either, as Microsoft took center stage too, announcing the availability of its .NET Core for Red Hat Enterprise Linux. In this slide show, eWEEK takes a look at some of the highlights of the Red Hat Summit and DevNation 2016 events.
  • How Red Hat is tailoring OpenStack to fit … everyone
    Even though there have been no major changes announced to the OpenStack platform of late, it was still one of the most talked about subjects at this year’s Red Hat Summit. Red Hat plays a significant role in the development of the platform and is very proud of its contribution to the community.
  • New technologies foster an open-source environment
    In 2007, when 3scale, Inc. was founded, some people thought it was crazy to be investing so much time and energy into API. But Steven Willmott, CEO of 3scale, Inc., said that even at that time his team knew that the future was API-driven, and they wanted to help that happen.

Leftovers: Gaming

Servo Night Builds Begin, Linux Packages Coming

The Mozilla developers working on the Servo browser layout engine and the Browser.html HTML-based web UI have kept to their goal of making a tech preview available in June. As of last night, the Servo developers hit their tech preview milestone we've been looking forward to seeing for months. Nightly builds of Servo and Browser.html have begun and they are going to be making available Linux packages shortly. Read more

Android Leftovers