Skip to content
Archive of posts tagged bash

bash completion

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 I wanted. I did get a lot of information on bash completion but not a single [...]

faster bash operations on files with File Descriptors.

I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with 12345while read line do done<file and then use redirection operations like “>” and “>>” to write to file. Done with the script pretty fast. So far so good, when I went [...]

Unix shell script for removing duplicate files

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 May 20121, seems like wordpress did not like it so well so reformatting the code ::::::: #!/bin/bash – #=============================================================================== # # FILE: a.sh # [...]