Skip to content
Archive of posts tagged script

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 # [...]

shopt causes bash completion to stop working.

Couple of days, I added some scripts to my bash startup and suddenly realized that bash completions stopped working. This is tricky situation in bash to figure out what went wrong. So, I set my foot down to make sure that I find out the culprit. Thus I started with method of elimination. So, I [...]

bash 4.0 – new feature mapfile

Recently I encountered a problem where I had to create couple of arrays in bash and these were quite dynamic in nature. This script was supposed to be used by couple of guys whom I did not trust too much in opening the script and modifyikng the array. So, the solution was to put these [...]