These are some shell scripts that you can put in your path or in your *.rc file and that will make your shell coding easier.
Stands for TouchMake, and as the name says, it can touch a file and make a dir. With this command you can create a file and its parent dirs in one command.
Combines mkdir and touch to simplify boring process like creating directory structure.
#the regular touch command
$ touch path/to/file.txt
touch: cannot touch 'path/to/file.txt': No such file or directory
#touchm solves this
$ touchm path/to/file.txtWithout args touchm will warn you like the regular touch.
$ touchm
Missing file operandNote:
touchmchecks if the given path is valid usingpathchk.
There is a Windows version of touchm made with batch that works like the Linux one. To use it in your terminal you have to add the batch script to your path.
Stands for CDMake, and the name says it all. Combines mkdir and cd (actually pushd) to create a directory and move you into that new directory.
You can create multiple dirs but you will be moved only to the first one.
Note: You cannot use the script in a script file, and you have either to source the file (
source path/to/cdm) or to add it directly to you.*rcfile (better).
#from this command
$ mkdir -p ./my/project && cd ./my/project
#to this command
$ cdm ./my/projectYou can use cdm without args and it will bring you back to the most recent directory on stack (using popd).
#cdm without args will move you back
$ cdmNote:
cdmchecks if the given path is valid usingpathchk.
Licensed under MIT License. This code is open source and always will be.