FINALLY! SOME UPDATES! This website is being reconstructed. Some content will go away soon. If you want to see my new stuff, visit my github: https://github.com/jrcharney/.

new.sh : On-the-fly file creation.

About this project

This project includes all of the new.sh series of files except new_c.sh which has its own page.


Questions

What is new.sh?

new.sh started out as a series of separate shell scripts. All of them designed to generate new files based on what file you wanted to make. The smaller scripts were developed well enough that they were combined into one script which executes a task based on the file extension of the input argument.

How are the files generated?

new.sh is what I'd like to call a "smart script". It does more than just touch. It generates the headers and file structures commonly used when writing a shell script.

Thus, if you want to create a new Bash shell script use new.sh file.sh). A new Java source file? Use new.sh file.java. (With java it can also write the basic class template.) A new Perl script? new.sh file.pl. Or even a new PHP file? Use new.sh file.php). The possiblities could be endless if I new the layout of every file time. But this script just handles the few frequent ones.

I have a new_c.sh file for creating C and C++ files, but I'm making a better version of it to do more than create new .c and .cpp files. new_c.sh has some advanced features that I should consider integrating into new.sh in the near future.

Why create a script to do this?

The purpose of the new_sh is to eliminate the repetitive task of writing common code sequences and to encourage the use of writing a header in files that describe what a file does.

Why are C and C++ files not generated with New.sh?

new_sh and new_c.sh are two different animals at this point. new_sh just generates scripts. new_c.sh does more than that. I'll explain that on the new_c.sh project page.


Downloads

File Version Date Description
new.sh 2.1a 6 Sep 2012 Code is better organized. A push toward beta status!
new.sh 2.0a 17 Aug 2012 Major fixes made. Create a file based on file extension. Obsolete.
new.sh 1.1a 8 Jul 2012 Create a file based on file extension. Obsolete
new_bash.sh 1.0a 1 Mar 2012 Create a new shell script. Obsolete.
new_php.sh 1.0a 1 Mar 2012 Create a new PHP file. Obsolete.
new_java.sh 1.0a 28 Feb 2012 Create a new Java source file. Obsolete.
new_perl.sh 1.0a 28 Feb 2012 Create a new Perl script. Obsolete.

Tags

Under Construction