Sunday 1 December 2013

Bash PS1 prompt with exit status

Just add the following code to your '~/.bashrc' file,


export PS1='\[\e[01;32m\]\u\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;37m\]>\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;33m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[$(((($?>0))*31))m\]\$\[\e[0m\] '

And then run the following command to apply changes,


source .bashrc

For screenshots and more information read my post here,

A nice looking and useful bash PS1 prompt

Cheers.

Friday 9 August 2013

Linux File Backup Script

I've already written a detailed article on my blog Looking at Linux through the Windows of Life explaining this file backup script. So this post is going to be really short. Visit the following link to read more about this bash based file backup script for Linux.

Linux file backup script

Cheers!!!

Sunday 28 July 2013

Linux Screen Capture Script

This bash script uses scrot as back-end so you will need scrot installed on your system. scrot is available in repository of almost every distribution.
Why not use scrot directly you might ask?