bash
function for copy files with progress bar (using pv – pipe viewer)
2010/11/11
function for copy files with progress bar (using pv – pipe viewer) […] <td> <div class="text codecolorer"> cp_p() { if [ `echo "$2" | grep …
Print all environment variables, including hidden ones
2010/11/09
Print all environment variables, including hidden ones […] <td> <div class="text codecolorer"> for _a in {A..Z} {a..z};do _z=${!${_a}*};for _i in `eval echo …
Quick tip on zipping logs in real time.
2010/10/13
Sometimes, some small things that we don’t actually think can be useful are such useful. I faced this couple of days back when I was working on something and the amount of logs getting generated and …
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"> <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’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 – >&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