Hi guys, hope u r well and can help.
I want to create a simple bash script that does the following..
When run, eg. newfile.sh,
1) Prompts the user for a destination filename
2) Does a cp of a file located in /templates/ of /templates/menu2_x_x.php
3) Copies the file to /new/
with the new file being what the user has typed in at the prompt.
So, the sequence is:
#newfile.sh
[Please Enter new filename] <Script Prompt>
menu2_it_test.php <User Entered>
--------------------------
Result is:
New file created in /new as
/new/menu2_it_test.php
which is a copy of /templates/menu2_x_x.php
Any help greatly appreciated.
Id like to do this in a bash script and not with perl if that is okay :>) Thank you.
Start Free Trial