Posts Tagged bash
📅 April 8, 2017
Bash arrays can be tricky, so here are a few hints to aid understanding.
📅 January 14, 2015
Here is a computer term rarely heard these days: amp off.
To amp off means to run in the background, and it is derived from the ampersand character (& or amp) placed at the end of a command line in a Linux or UNIX terminal.
Figlet is a command line program that styles a given line of text with a font of your choosing, so you can from this,
__ __ _ _____ _ _ _ _ \ \ / /__| | ___ ___ _ __ ___ ___ | ___(_) __ _| | ___| |_| | \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \ | |_ | |/ _` | |/ _ \ __| | \ V V / __/ | (_| (_) | | | | | | __/ | _| | | (_| | | __/ |_|_| \_/\_/ \___|_|\___\___/|_| |_| |_|\___| |_| |_|\__, |_|\___|\__(_) |___/
Do you need to set a file so nobody can delete or edit it? Simple! Set the immutable attribute on the file.
Suppose you have an important info.txt file, a frequently asked questions file, a set of instructions, or even installation scripts that exist on a Samba share. Perhaps these files are accessible via SSH or FTP where write permissions are granted. In any case, they must not be deleted or tampered with, even by root.
Absolutely, but you must write your own routine. Unlike other programming languages, such as Python, that contain dedicated shuffle methods, Bash does not have a built-in shuffle function of its own.
Here is one example of a custom shuffle script.
Are you using scripts to mount your Truecrypt drives? Do the device paths seem to mix up randomly upon each system boot which confuses your scripts? Here is a technique to make sure each Truecrypt encrypted drive mounts in the correct mount point using disk identifiers to specify drives.
Read the rest of this entry »