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
Port Forwarding
Cannot access the clipboard after a period of time of use
Download Enterprise Manager
SQL express 2005 - create a DB admin equivalent user account
Problem printing 2 pages per sheet for mulfiple worksheets
two words from one cell split to two cell's with one word ecel07
Downloading a pdf form and then make it fillable
Default page for people to get to their email
IE^ and IE7 Registry Settings
fatal: open /dev/sdc: no such device or address: WHY?