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
Vista can't connect to the server. Fails user name / password. XP works fine
Apache .htaccess subdomains ?
Visual WEB Developer installation creating Personal Web Site Starter Kit ... problems
poll_wait()
use Snag It to Capture .AVI Frame?
Free OST to PST convertor
Insert from listbox changes text to number
How can I decode UTF characters from a file using Python?
Event ID 2020 SVR - After HP Software install, reboots needed a couple times a day
Flag number