I want to create a shell script that will create a pre-formatted file and open it in vim.
Specifically, I want to create a script called newperl
that will allow me to type newperl [filename]
and generate a file (using cat, echo, >, etc.) that is pre-formatted with
#!/usr/bin/perl
use 5.014;
etc.
I know how to do all the formatting etc. My problem is passing the [filename] which I type in after newperl
to the rest of the script as an argument. How do I do that?