In an effort to assist those of you out there that like to automate processes but use bash instead of C-Shell, I have compiled a list of some useful functions to stick in your .bashrc file. Here is a list of the functions that this post will contain:
- Extract: This function will determine the type of archive you are dealing with, and issue the corresponding command to extract it.
- Compress: This function will create a .tar.gz archive of whatever files you give.
- Swap: This function will swap the names of 2 different files.
- Clock: This is just a random function that will display a digital clock in your terminal window and update every second.
- Cpg: This function will copy a file to a directory, and also
cdyou to a directory.
- Mvg: This function works like Cpg, but moves the file instead of copying it.
- Findit: This function will search for a file with the given pattern in the name.