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

Kernel and Graphics in Linux

Manjaro Linux: Reliable and Up to Date, Geekdom Optional

Regular readers can pretty much ignore this one. We’ll be back to cartoons, O’s baseball and the usual inanity soon, tomorrow in fact. I just wanted to revisit my dedication to Linux, prompted by a recent mixed bag of experiences that left me feeling even more positive about a relative newcomer to the distro scene: Manjaro. It all started a few days ago, when I decided to finally try to update the eight remaining Linux installs on my main desktop PC. I’ve been using Linux Mint (18.1 Cinnamon) as my daily driver for several months, originally in an attempt to keep my bandwidth usage to a reasonable level, and then due to inertia/lack of issues. I could have gone with my trusty Debian stable install, my go-to for years up till then, but I guess I was just getting bored. Read more

Kirigami 2.1

  • Kirigami 2.1 [Ed: post removed, maybe temporarily/by accident]
  • KDE Kirigami 2.1 Released To Help Build Convergent Linux Apps
    While convergence may be dead at Ubuntu/Canonical, KDE developers continue working on Plasma Mobile and their convergence vision driven in part by the Kirigami user-interface framework.
  • Kirigami 2.1 Open-Source Framework for Convergent Mobile and Desktop UIs Is Out
    KDE's Paul Brown announced the general availability of version 2.1 of the open-source Kirigami UI framework for producing convergent user interfaces for mobile and desktop environments. Kirigami 2.1 is here three and a half months after the launch of Kirigami 2.0 as the project's most mature version to date. Prominent features include ItemViewHeader, a standardized title for ListViews, which can be customized with a background image that uses a parallax effect when scrolled and the header is adjusted accordingly. Multiple behaviors can be set for this component.

What is SSH Key? How To Generate SSH Key in Linux?

SSH is short for Secure Shell. Secure Shell is a network protocol that provides administrators with a secure way (with encryption) to access a remote computer. it allows an administrator to log into virtual space server with an SSH key instead of a typical password. This eliminates the usual weakness of cracking passwords since SSHs almost can not be deciphered or cracked. So how exactly does this work? Let's find out in this tutorial. Read
more