Category: Command Line

Iterate a Text File in Bash

This is how you iterate thru a text file outputting a line at a time in Bash shell scripting.

Convert RAW files to JPEG

Convert RAW files to JPEG in batch. Convert all files in a folder using a command. For this to work, first you must have ‘ufraw’ package installed. sudo apt-get install ufraw or sudo yum install ufraw depending on your OS

Send One Line From a Text File as as SMS Every 10 Mins

This command will send a line from a given text file one every 10 mins as an SMS to a given number.

Send Text Once Every 15 Mins

Command to send a text to any phone once every 15 mins.

Generate Password

Command to generate a random password… openssl rand -base64 6

Watch for Ubuntu 9.10 Launch

This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.

Command to Find Current Ubuntu Version

Run this command to find the installed version of Ubuntu… cat /etc/lsb-release

top in Batch Mode

Run top in batch mode top -b -d 10 -n 3

Trasfer over the network

Transfer stdin and stdout to and from machines over the network ssh remote_machine ‘cat – > file’ < file

Add Line Numbers

Use this command to add line numbers to a text file… sed = filename.txt | sed ‘N;s/\n/\t/’ > filename_number.txt