Tips tagged bash


10

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 »

3

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 »

5

Tip #310   Keeping your Home Directory Organized

Seen on http://www.splitbrain.org/blog/2008-02/27-keeping_your_home_directory_organized

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 »

8

Tip #304   Get your IP in one line

#!/bin/bash
# by dj.r4iden
echo "Your ip Address is" `lynx --source http://www.formyip.com/ |grep The | awk {'print $5'}` Read more »

-1

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 »

6

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 »

10

Tip #254  

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

1. Go to proddir
Read more »

27

Tip #216   Create a Terminal Calculator

Put the following in your .bashrc file

Read more »

-7

Tip #213   Howto get DVDs playing on Ubuntu Gutsy

Get DVDs playing on Ubuntu Gutsy by installing libdvdcss2.

Read more »