Tips tagged bash


Tip #313   Get latest stable version of the Linux kernel

A simple shell script to get the latest stable version of the linux kernel:

Read more »


Tip #311   Filter stderr for cron jobs

Tired to get your mailbox full of cron information messages?
Eg.: some programs (pg_dump, /etc/init.d/xxx, ...) output informational messages on stderr, but you can't close stderr because it may also contain failure informations.

Read more »


Tip #310   Keeping your Home Directory Organized

Seen on

Having one temporary directory for downloads etc can quickly become a mess, so try this tip to organise by date. Put this into your .bashrc

Read more »


Tip #304   Get your IP in one line

# by dj.r4iden
echo "Your ip Address is" `lynx --source |grep The | awk {'print $5'}` Read more »


Tip #261   Problem-free once-per-line loop

The for loop has a problem with entries with spaces, whether it's file names or entries in a text file. Common solutions include changing the IFS variable to exclude spaces (so that the for loop will only use tabs and line breaks to separate entries) and piping the entries to a 'while read line; do' command. However, setting and resetting IFS each time you want to include/exclude spaces is kinda messy and the 'while read' thing means you can't make any normal use of the read command within the loop. For a once-per-line loop that doesn't present these problems, try

Read more »


Tip #258   List non-system users

I use the following to list non-system users. It should be portable though won't work on systems without the getent command.

Read more »


Tip #254  

Make a backup of existing files, afterwards copy new files from somedir:

1. Go to proddir
Read more »


Tip #216   Create a Terminal Calculator

Put the following in your .bashrc file

Read more »


Tip #213   Howto get DVDs playing on Ubuntu Gutsy

Get DVDs playing on Ubuntu Gutsy by installing libdvdcss2.

Read more »