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
SMTP internal mail stuck in Queue; External mail delivers...
Vista: How can I get the Task Scheduler in Vista to run a BATCH file (Myproc.BAT)?
Open Explorer window in maximized mode
COALESCE and AS with CASE WHEN statment, other ways?
PowerShell - Array of arrays
Change default desktop and favorites location in Windows Vista
Attachments open REALLY slow
winmgmt?
Windows Vista recognized printer and installed drivers, but it won't print.
New osCommerce install admin errors