Tag Archives: bash

Removing version numbers from … well anything

This one liner can remove the version numbers from any string (providing they start with a hyphen and a digit). Advertisements

Posted in CentOS, Linux, RedHat | Tagged | Leave a comment

Using RPM to find package dependencies

I recently discovered that is it actually rather difficult to determine which packages depend on a particular package using the RedHat Package Manager, and I ended up writing a short script to list all the dependencies for a particular package.

Posted in CentOS, RedHat | Tagged , | Leave a comment

Comparing lists of things…

Obviously when I want to compare two files I’m going to use  diff .

Posted in Linux | Tagged | Leave a comment

Downloading files using Wget

Or how to use up a lot of disk space real quick…!

Posted in Linux | Tagged , | Leave a comment

Check OS version (Debian/Ubuntu/Raspbian)

There are several ways to check which version of Debian, Ubuntu or Raspbian you are running.

Posted in Debian, Linux, Raspbian, Ubuntu | Tagged , , , , , , | Leave a comment

Executing commands on a remote machine using SSH

You can use ssh to execute a command on a remote machine, in this case to shut it down, which can be particularly useful if you want to turn off a Pi gracefully but don’t have a keyboard or screen … Continue reading

Posted in Linux | Tagged | Leave a comment

Download installed packages

This script will determine what packages you have installed and download a copy of each package to you current folder.

Posted in Debian | Tagged , , , | 1 Comment

Script template

The following shell script doesn’t do anything interesting by itself but it is a very useful bit of boiler plate for parsing command line options.

Posted in Programming | Tagged | Leave a comment

Check remaining disk space

The following commands will check to see if you are running out of disk space and warn you when any partition has 20% or less free space.

Posted in Programming | Tagged | Leave a comment

Prompting for a Yes/No response (BASH)

Short bash function routine to prompt the user to enter Yes or No (which may be abbreviated to Y or N) in response to a prompt.

Posted in Programming | Tagged | Leave a comment