Doing calculations using bash

Doing calculations using bash

Sometimes in my small shell script i’ve to do some math, usually nothing too complex but it’s useful to do the math inside the bash script. Bash it’s really complete and among the many builtin functions there are also some mathematical functions. Using the syntax $((expression)) you can evaluate the expression. Operations allowed are quite […]

Bash and I – The Bourne-Again SHell

Bash and I – The Bourne-Again SHell

by Frank Harris-Smith Bash has been around since pre-historic times, at least before GNU/Linux’s first release in 1991. My first personal encounter with Bash was in 1993. This was two years before Microsoft Windows 95 was released and Windows 3.1 was just a bad joke. The Software Development Company I was working for was using […]

Tac and Rev to see files in reverse order

After many years of administration of Unix/Linux systems and using bash for many tasks i’ve discovered the command tac, the contrary of cat, What this command do it’s to concatenate and print files in reverse order, it writes each file to standard output, last line first. bash$ cat file1.txt This is the line 1. This […]

How to mounts an archive for access as a file system

Sometimes it happen to have the need of check what’s inside a .tar.gz file archive or perhaps you just need to extract a couple of files from another archive, this is possible you just have to remember all the flags or simply extract all in /tmp and then discard the files that you don’t need. […]

Tmux - the Terminal multiplexer

Tmux – the Terminal multiplexer

In a former article i’ve show how to use Screen and Byobu, in short Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells) while Byobu is an elegant enhancement of the otherwise functional, plain, practical GNU Screen. Byobu includes an enhanced profile and configuration utilities for the […]