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

Development News

  • KDevelop 5.0.3 Open-Source IDE Improves GitHub Handling Authentication, More
    The development behind the open-source and cross-platform KDevelop IDE (Integrated Development Environment) was proud to announce on the first day of December the availability of the third point release for KDevelop 5.0 stable series. KDevelop 5.0.3 arrives one and a half months after the second maintenance update, but it's a small bugfix release that attempts to patch a total of nine issues reported by users since then. However, it's a recommended update for all users. "We are happy to announce the release of KDevelop 5.0.3, the third bugfix and stabilization release for KDevelop 5.0. An upgrade to 5.0.3 is strongly recommended to all users of 5.0.0, 5.0.1 or 5.0.2," reads the release announcement.
  • PHP 7.1.0
    The PHP development team announces the immediate availability of PHP 7.1.0.
  • PHP 7.1 Makes Its Debut
    This first major update to last year's huge PHP 7.0 release builds several new features on top. Introduced by PHP 7.1 is nullable types, a void return type, a iterable pseudo-type, class constant visibility modifiers, support for catching multiple exception types, and many other language enhancements plus more performance optimizations and other work.

Games for GNU/Linux

OSS Leftovers

SUSE Leftovers

  • openSUSE Tumbleweed – Review of the Week 2016/48
    After releasing daily snapshots without interruption for 17 days, Tumbleweed did slow down a bit during the last week. As already mentioned in my last review, 1124 had been canceled due to an issue with sddm installing strange branding configurations. And later on, we ‘broke’ our own staging setup and needed to bootstrap a few of them, making the throughput much lower than you were used to. So, we ended up with 3 snapshots since my last review: 1125, 1128 and 1129.
  • Highlights of YaST development sprint 28
    November is over, Santa Claus elves start to stress and the YaST team brings you one of the last reports of 2016. Let’s see what’s new in YaSTland.