Microsoft
Software
Hardware
Network
Question : Creating a bash script which accepts parameters
Hi guys hope u r well and can help.
Im trying to build a perl (OR bash) script that will help me automate the process of creating new files based on what I have in the perl (or bash)script.
-------------------------
CURRENT METHOD:
-------------------------
Here is what Im currently doing (which I wish to change by building a bash script):
Im manually doing the following each time I need to create a new file.
cp /var/www/html/simeswiki/te
mplates/me
nu1.php /var/www/html/simeswiki/me
nu1_
.php
cp /var/www/html/simeswiki/te
mplates/me
nu2.php /var/www/html/simeswiki/me
nu2_
.php
cp /var/www/html/simeswiki/te
mplates/me
nu3.php /var/www/html/simeswiki/me
nu3_
.php
cp /var/www/html/simeswiki/te
mplates/me
nu4.php /var/www/html/simeswiki/me
nu4_
.php
cp /var/www/html/simeswiki/te
mplates/me
nu5.php /var/www/html/simeswiki/me
nu5_
.php
-------------------------
GOAL/s:
-------------------------
- Create a perl (or bash) script that:
a) Contains the full path to the menuX.php files
b) Upon execution,
(i) Will prompt for a destination filename for each copy command executed in the bash script
(ii) Will not require the full path and filename for the newly created filename for each copy command executed.
So, for example, if the script was called createfile.sh,
(Comments are in < >, and defines if it is user entered of script)
If i run createfile.sh, it will do something like the following..........
createfile.sh
Enter New Filename based on menu1.php....
Random Solutions
SQL Server Column Sizes
Resedit for OS X
Blackberry users not receiving email
Error 0x433 when installing The Message Queuing serivce
Convert number to formatted string
How to preload gifs in background from xml?
PHP code not working in IIS when creating a virtual Directory
In W2003, How can I auto-populate users' home folder with a file
Oracle kypressed
Fonts missing in Mircosoft Word only