08-02-2008
replacing parameter in shell script
I have a script file as below named test1.sh
sed -e 's/xxxkeys/$1/g' template1.asp > template1.txt
sed -e 's/xxxkeys/$2/g' template2.asp > template2.txt
sed -e 's/xxxkeys/$3/g' template3.asp > template3.txt
sed -e 's/xxxkeys/$4/g' template4.asp > template4.txt
I want to replace $1 with a, $2 with b, $3 with c and $4 with d in test1.sh file
- Please suggest me a simple shell script to replace values above
- or Please suggest me how can I pass values from prompt
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I was able to pass parameters to a shell script from the command line but now, I am trying to make the shell script to get those parameters/values from a file.
Please give me ideas how to do this or if you have an example or website that shows how to do this.
I tried searches but it... (2 Replies)
Discussion started by: bryan
2 Replies
2. UNIX for Dummies Questions & Answers
Can anyone help me how to write a shell script which accepts input parameter. My requirement is as follows:
I need to run a shell script with a input parameter, and inside the script i will create a file with this input parameter name.
Please help me out to create such a shell script.
... (1 Reply)
Discussion started by: jhmr7
1 Replies
3. Shell Programming and Scripting
Hi All
I have a shell script which calls all the Teradata Utiltyes . There is a sudden change in the requirment .
What i'm asked to do is
pass on the DATE to the shell script which should take the date automatically and run the utilityes.
i.e. the date should not be passed on... (5 Replies)
Discussion started by: vinayrao
5 Replies
4. Shell Programming and Scripting
Hi,
I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram
I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies
5. AIX
I would like to run a compress script on files in certain directories.
My compress_script.sh is just basically
compress file*
In order for me to use this I have to copy it into each directory and run it.
How can I state the directory on the command line with the compress script so it... (2 Replies)
Discussion started by: NycUnxer
2 Replies
6. Shell Programming and Scripting
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, inside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks
Double post - check your PMs and follow the rules, thanks. (0 Replies)
Discussion started by: damodarreddys
0 Replies
7. UNIX for Dummies Questions & Answers
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, iside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks. (3 Replies)
Discussion started by: damodarreddys
3 Replies
8. Shell Programming and Scripting
Hi
I have two shell script, the second script takes as a parameter the output variable of the first script, please how to retrieve the variable from the first script to pass as a parameter to the second script?
Script1.sh
i=0
i=$(($i + 1))
Script2.sh
echo $1
Thank you (0 Replies)
Discussion started by: chercheur111
0 Replies
9. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
10. UNIX for Dummies Questions & Answers
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies
LEARN ABOUT SUSE
mono-asp-apps
mono-asp-apps(1) User Commands mono-asp-apps(1)
NAME
mono-asp-apps - utility to manage ASP.NET 2.0 applications installed from RPMs
SYNOPSIS
mono-asp-apps command [options]
DESCRIPTION
The 'mono-asp-apps' command is useful on systems which install applications from RPM packages and when the RPM packages have been created
according to the Mono RPM packaging guidelines for ASP.NET applications.
The utility allows one to initialize, enable, disable and start installed applications. Note that you do not use this utility to manage
applications hosted and managed by the Apache (or other) web server, only by xsp.
Note that this utility is useful only on systems where at least one application packaged according to the Mono ASP.NET 2.0 RPM packaging
guidelines has been installed.
COMMANDS
The commands which take an application name, require the it to be one of the registered names. See the `list` command below.
init APPLICATION_NAME
Initializes the application named APPLICATION_NAME, if it hasn't been done already. Initialization actions performed are applica-
tion specific, but may include creating databases and populating them, creating directories, downloading files etc.
enable APPLICATION_NAME
Enables APPLICATION_NAME for automatic start when XSP is started as part of the system bootup process.
disable APPLICATION_NAME
Disables APPLICATION_NAME, so that it is not started automatically when XSP is started as part of the system bootup process.
start APPLICATION_NAME [server_options]
Manually starts the xsp2 process passing the configuration of APPLICATION_NAME to the xsp2 process. Applications may ship with a
bundled start script which will be used instead of xsp2 if present. server_options are passed verbatim to the server process.
list Lists all the applications known to the utility.
AUTHORS
Marek Habersack <mhabersack@novell.com>
SEE ALSO
xsp(1)
MORE INFORMATION
The Mono project (http://www.go-mono.com) is a collaborative effort led by Novell (http://www.novell.com) to implement an open source ver-
sion of the .NET Framework.
MAILING LISTS
Mailing lists are listed at the http://www.mono-project.com/Mailing_Lists
mono-asp-apps 2.6.4 31 Oct 2007 mono-asp-apps(1)