bash

using `!#$’ to referance backward-word

2011/11/03

Image by jeffalldridge via Flickr […] Here is something that I found on the commandlinefu cp /work/host/phone/ui/main.cpp !#$:s/host/target Ah well…its very interesting and very useful. Some …

Compare files excluding certain lines.

2011/10/18

Quick tip, you can use any expression for the sed commands in the (). With this trick you can redirect the stdout of 2 commands to the diff command. This might become very useful, if you want to …

Cont: Get yourself some more conkyrc files.

2011/10/12

Last time we got ourselves some conkyrc files from the ubuntu forums. But that scripts gets the files only from the First page of the thread. Lets extend this further and get the script to get all the …

Creating a chroot environment – the script.

2011/09/23

Here is the script, very simple and effective 🙂 #!/bin/bash - #=============================================================================== # # FILE: mkchroot.sh # # USAGE: ./mkchroot.sh # # …

Creating a chroot environment in Fedora with bash and other utils.

2011/09/19

[ad#ad-2] I am testing some of my scripts to work on a very old system and there the versions of the most popular applications are very old, real old :(. So, some of things that I am very used to …

better bash debugging

2011/09/16

I was trying to debug some bash scripts yesterday and learnt something new 😉 There are lot of things in bash that you can use to debug and to start with you can enable xtrace mode as follows: set -x …

[Solved] ssh works but scp does not

2011/08/29

Image via Wikipedia […] For quite sometime now, I was having this issue, that for the home system, I was able to connect to is using ssh but it never worked. Fnally after quite some debugging …

bash completion

2011/08/09

I was working on some functions in bash to make my life easier and realized that if I added custom completion to my functions, it will be really good. So I headed over to google and searched for what …

faster bash operations on files with File Descriptors.

2011/06/11

I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with […] <td> <div class="text codecolorer"> while …

Total upload and download on any interface.

2011/06/05

Something that I have been searching for a long time, finally some look inside the <a class=“zem_slink” title=“Procfs” rel=“wikipedia” …

Unix shell script for removing duplicate files

2011/05/16

The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them (copy-paste from here): ::: updated on 02 …

mysql output to an array for easy parsing.

2011/05/11

 Today I was looking for some way to put the output of the mysql output in an array in a bash script. Quick google search yeilded to results something like this: […] <td> <div …


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