Sponsored Content
Full Discussion: Passing parameter in quotes
Top Forums Shell Programming and Scripting Passing parameter in quotes Post 302382007 by zam on Monday 21st of December 2009 06:22:30 PM
Old 12-21-2009
Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parameter passing

Hallo everyone, This is my problem below: /home/cerebrus/pax=>vat class2.sh ksh: vat: not found /home/cerebrus/pax=>cat class2.sh #!/bin/ksh set -x bdf|grep appsdev|awk '{ print $5 }'> class3 dd={cat class3} echo $dd /home/cerebrus/pax=> /home/cerebrus/pax=>./class2.sh + bdf +... (8 Replies)
Discussion started by: kekanap
8 Replies

2. UNIX for Advanced & Expert Users

Parameter passing in a function

I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in. How can I make the function receive the whole string (and not terminate at the first space it encounters)?. part of... (2 Replies)
Discussion started by: fastgoon
2 Replies

3. Shell Programming and Scripting

Passing asterisk As A Parameter

I have written a Shell Script Program which accepts 3 parameters as shown below: ./calc 20 + 2 in the above line ./calc is the Shell Script itself with 3 parameters, namely: 20 + and 2. Well, now let's look inside the Script: result=$1$2$3 echo $result The output will be as... (8 Replies)
Discussion started by: indiansoil
8 Replies

4. Shell Programming and Scripting

[/bin/sh] passing parameters with quotes between 2 scripts

Hi, I have a first shell script (/bin/sh) that receives some paremeters. This is only an example (there are more parameters in fact and this one is among them): -header "This is a test" This script calls a secund shell script (/bin/sh) with the same parameters. But, quotes disappear as I would... (0 Replies)
Discussion started by: velo_love
0 Replies

5. Shell Programming and Scripting

Parameter Passing problem

Hi All, I developed a KSH script which will accept two parameters as input. These two parameters are some directories paths. In the script i am validating the number of paramaters it received as below #-------------------------------------- # Check Command line arguments... (8 Replies)
Discussion started by: Raamc
8 Replies

6. Shell Programming and Scripting

How to pass a parameter with double quotes around it to a command

In a bash script, I need to pass a parameter that has space in-between using double quotes as follows: CMD="SomeExecutable" # Parameter that has a space in-between PARAM1="TIMO 2" CMD_IN="--name=\"$PARAM1\"" CMD_OUT=`$CMD $CMD_IN` expected/required command execution:... (4 Replies)
Discussion started by: Timo
4 Replies

7. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

8. Shell Programming and Scripting

Passing parameter more than 9

Hi, I've written a script where eleven parameter to be passed from command line which is inserting into an oracle table, it is working but the tenth and 11th parameter are not accepting as given it is referring to 1st parameter. HERE IS THE SCRIPT #!/bin/ksh #set -o echo $*... (4 Replies)
Discussion started by: sankar
4 Replies

9. Shell Programming and Scripting

Passing parameter through file

Hi , I am passing date parameter through file my shell script testing.sh is #set -x #set -v asd=$1 asd1=$2 echo $asd echo $asd1 Passing parameter as below sh testing.sh `cat file1.txt` Output (2 Replies)
Discussion started by: kaushik02018
2 Replies

10. Shell Programming and Scripting

Passing single quotes to grep

Hi, I have a grep command which searches if a particular word ends in a pattern grep 'ee\>' * The above command searches for any word that ends with ee across files and works as expected. I need to parametrize ee and run the command so I tried the following but none work A=ee grep... (1 Reply)
Discussion started by: wahi80
1 Replies
INNCONFVAL(1)						    InterNetNews Documentation						     INNCONFVAL(1)

NAME
innconfval - Get configuration parameters from inn.conf SYNOPSIS
innconfval [-pstv] [-i file] [parameter ...] innconfval -C [-i file] DESCRIPTION
innconfval normally prints the values of the parameters specified on the command line. By default, it just prints the parameter values, but if -p, -s, or -t are given, it instead prints the parameter and value in the form of a variable assignment in Perl, Bourne shell, or Tcl respectively. If no parameters are specifically requested, innconfval prints out all parameter values (this isn't particularly useful unless one of -p, -s, or -t were specified). All parameters are taken from inn.conf except for version, which is always the version string of INN. If given the -C option, innconfval instead checks inn.conf, reporting any problems found to standard error. innconfval will exit with status 0 if no problems are found and with status 1 otherwise. OPTIONS
-C Check inn.conf rather than printing out the values of parameters. -i file Use file as the source configuration file rather than inn.conf. file must be a valid inn.conf file and will be parsed the same as inn.conf would be. -p Print out parameters as Perl assignment statements. The variable name will be the same as the inn.conf parameter, and string values will be enclosed in single quotes with appropriate escaping. Boolean values will be mapped to the strings "true" or "false". List values will be mapped to an array of strings. NULL values are not printed out and will therefore be "undef" in Perl. Here is an example: $enableoverview = 'true'; @extraoverviewadvertised = ( 'Newsgroups', 'Injection-Info' ); $organization = 'Let's try nasty "quotes"'; $maxforks = 10; If innconfval is called via the Perl "INN::Config" module, all these variables are properly exported. -s Print out parameters as Bourne shell assignment statements. The variable name will be the inn.conf parameter name in all capitals, and all variables will be exported, if not NULL. String values will be enclosed in single quotes with appropriate escaping, and boolean values will be mapped to "true" or "false". List values will be mapped to a space-separated string representing an array of strings (as Bourne shell does not recognize arrays, contrary to several other shells, an array cannot be returned for interoperability reasons). Here is an example: ENABLEOVERVIEW=true; export ENABLEOVERVIEW; EXTRAOVERVIEWADVERTISED='"Newsgroups" "Injection-Info"'; export EXTRAOVERVIEWADVERTISED; ORGANIZATION='Let'''s try nasty "quotes"'; export ORGANIZATION; MAXFORKS=10; export MAXFORKS; -t Print out parameters as Tcl assignment statements. The variable name will be the same as the inn.conf parameter name but with "inn_" prepended, and string variables will be escaped appropriately. Boolean values will be mapped to the strings "true" or "false". List values will be mapped to an array of strings. NULL values are not printed out. Here is an example: set inn_enableoverview "true" set inn_extraoverviewadvertised { "Newsgroups" "Injection-Info" } set inn_organization "Let's try nasty "quotes"" set inn_maxforks 10 -v Print INN's version. This is equivalent to "innconfval version". HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. $Id: innconfval.pod 8919 2010-01-22 23:29:28Z iulius $ SEE ALSO
inn.conf(5), INN::Config(3pm). INN 2.5.2 2010-02-08 INNCONFVAL(1)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy