bash

bash script to run a command and take screenshot in every loop.

2010/09/24

Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file: <img class="size-medium wp-image-2555" …

bash – echo command with option to display the output on the same line.

2010/09/21

Here is a nice little trick to display the output in the same line : […] <td> <div class="bash codecolorer"> &nbsp;<span class="kw3">echo</span> …

Remove some path from the PATH variable temporarily.

2010/09/04

How many times has it happened to you that you are working on some linux platform (like Fedora/Ubuntu/CentOS etc) and suddenly you see that you need to remove some path from the PATH variable so that …

Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.

2010/09/01

Use the last command&#8217;s output as input to a command without piping and bind to it to a key sequence in <a class="zem_slink" title="Bash (Unix shell)" …

tee to a file descriptor

2010/08/13

tee to a file descriptor […] 1 $ tee >(cat &#8211; >&2) the tee command does fine with file names, but not so much with file descriptors, such as &2. This uses process …

Paste clipboard is bash or shell scripts with modification.

2010/07/20

Today I had a issue where I wanted to paste the clipboard to a shell script after removing the spaces. So, I went hunting for a way to do this. Finally I came up with this: […] sudo yum install …

CLI Color and bash prompt.. some colored fun with prompts in bash

2010/06/29

There are two ways to do it, one is with tput command. We will see that some other time, today we will consider the escape sequence way. First we need to understand the colors as understood by bash. …

Getting your wordpress self hosted stats on your console with bash script.

2010/06/29

Some time back I wrote a blog on how to get your site stats using curl in <a class="zem_slink freebase/en/bash" title="Bash" rel="homepage" …

Delete Files older than 14 days

2010/06/25

Taken from Dzone. […] @echo on setlocal set srcDir=. […] Read more: <a href="http://snippets.dzone.com/posts/show/10441">http://snippets.dzone.com/posts/show/10441

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 …

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: …


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