Unix shell scripts
Notes
Change downloaded filename to match the name shown in the link.
Browse
-
Shell scripts for identifying, refactoring and deduplicating XSLT templates.
- xtloc.pl: Finds a template by keywords (attribute values) and reports starting and ending line.
- xtdesc.pl: Prints one entry per template in source file with all attribute values for template. (Useful for input to xtloc.pl)
- xtchanges.sh: Given two XSLT files, identifies all the templates in the first and classifies each as 'new', 'different' or 'same' based on corresponding templates in the second file. (Requires xtloc.pl, xtdesc.pl and bdiff.sh in path.)
- xtchanges-example.sh: sample batch file using xtchanges.sh.
-
Variety of scripts to help with CVS
- cvs_mv.sh: recursively move all the files from one directory to another.
- cvs_rm.sh: remove one or more files from CVS and from disk.
- cvs_changes.sh: Prints any uncommitted changes recursively within current directory.
- cvs_unadded.sh: Prints any untracked changes recursively within current directory.
- bdiff.sh: Perform a diff between two blocks of text in two separate filesby line numbers.
-
Decrypt and encrypt file or directory using gpg, tar archiving and gzip compression.
- backup-media.sh: Conditionally backups up mounted media a maximum of once a day and performs backup rotation.
- pcvs: accomplishes some of the functionality of CVS branches with a simple interface. (Note that branches are standard practice and should be used in production; this is for illustratory purposes only)
- cpr_sbio.sh: CoPy Recursively but Skip Bad IO. Copies from a directory to a directory, but skips if not readable and deletes from destination if any problems.
- argsu: sorts and uniquifies arguments
- catsu: sorts and uniquifies contents of file
- check-for-files-with-same-path.sh: looks in multiple directories for any files with identical relative paths.
- count-lines-java-code.sh: count total lines of all the java code including plain old Java classes (.java), JSP (.jsp) and JavaFX (.fx). Easily adaptable to any file type, e.g., C, C++, etc.
- info-directory.sh: total number of files and size of a directory.
- monitor-directory.sh: prints out the size of a directory every minute. Also prints the size change, along with an average of rate of change. Useful when monitor downloads or activities generating data.
- stagger-copy-for-failing-drives.sh: copies directories with pause so, if a failing drive unmounts, has time to remount. Also generates a script of directories that failed so can try to copy again. Useful when copying many directories off failing drive.
- try-find-disk-error.sh: find disk or disk controller that is throwing disk errors.
Return to My Documents and Downloads »