bash

Magic space on the current command line

2010/06/25

# For how to set up magic space for Bash see: # – http://www.ukuug.org/events/linux2003/papers/bash_tips/#slide15 # – http://codesnippets.joyent.com/posts/show/1690 man bash 2>/dev/null | less -p …

bash one liner to change/remove test pattern from config file or text file.

2010/06/25

Problem: I had a directory with a lot of config files in the ini file format, i.e. name and value separated by equals. Some/all of these contained some directory names and other values which had to be …

Quick one liner bash function to navigate parent directories quickly

2010/06/25

up () { for i in $(seq 1 $1) ; do cd ..; pushd +1 ; done; } — if you like the popd and pushd way .. up () { for i in $(seq 1 $1) ; do cd ..; done; } — otherwise .. <div …

find duplicate entry in a list in bash with sed

2010/06/25

Here I will take an example of rss2email list, but I guess I will be able to pass on the concept. Here is example of the output of the r2e list command: […] 1: …

remove/replace text/path in config file.

2010/06/25

Lot of times I end up changing a particular text in config file to some other text. And when I have to do it for multiple files, all files having the text in multiple places, I end up opening the …

bash script to change the vim colorscheme from the list of locally available schemes

2010/06/24

Today I was just wondering how good it would be to have a script to change the <a class="zem_slink freebase/en/vim" title="Vim (text editor)" rel="homepage" …

Script to add all the partitions to the fstab.

2010/06/24

I wrote a simple script today to get all the partitions on all the disks and then create <a class="zem_slink freebase/en/fstab" title="Fstab" rel="wikipedia" …

Filename completion in Linux with mixed case and ignored case.

2010/06/23

This is one of my favourites, alwahs keep it handy. Linux is case sensitive by nature but you will always find filenames jumbled up in the case. So what is the solution: […] bind &#8221;set …

cdargs – bash cd command with bookmarks and browser.

2010/06/22

cdargs is a <a class="zem_slink freebase/en/bash" title="Bash" rel="homepage" href="http://tiswww.case.edu/php/chet/bash/bashtop.html">bash shell cd with …

concatenate compressed and uncompressed logs

2010/06/21

$ find /var/log/apache2 -name 'access.loggz' -exec <a class="zem_slink freebase/en/gzip" title="Gzip" rel="homepage" href="http://www.gzip.org/">zcat {} ; …

Linux command to repeat a string n times

2010/06/17

There are more than one situation where you wished that there was a simple way to print a character n number of times. At least I face that quite often, especially when you want to print a menu. I …

Change pidgin status from the command line

2010/06/16

$ purple-remote "setstatus?status=away&message=AFK" Thanks for the comment oshazard, i wasn&#8217;t aware of purple-remote existence. […] <a …


This website uses cookies to ensure you get the best experience on our website. Learn more Got it