10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them
export... (3 Replies)
Discussion started by: dev.devil.1983
2. UNIX for Dummies Questions & Answers
Im after some advise with a script i've written however doesnt appear to work how I would like.
Basically I have a perl script which sucessfully pulls an expect script to login to multiple nodes and obtain some output from the nodes (total number of nat ports that are in use... (0 Replies)
Discussion started by: mutley2202
3. Shell Programming and Scripting
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
##script is sample.ksh
.... (3 Replies)
Discussion started by: Lakshman_Gupta
4. Shell Programming and Scripting
Is there any way of in a script ask the user something and with the user answer retreave a internal result that uses the variable that the user had introduced?
Thanks (3 Replies)
Discussion started by: whity
5. Shell Programming and Scripting
Just give me an idea on how to do the below logic.
1. I have one master script masterload.sh, the usage of this script is
a. masterload.sh FULL BFLF_LOAD.txt
b. masterload.sh DELTA TDLD_LOAD.txt
c.masterload.sh USER MAS_LOAD.txt
FULL , DELTA ,USER are the varaibles based... (1 Reply)
Discussion started by: mora
6. Shell Programming and Scripting
I have a script get_DB_var.ksh which do a data base call and get some variables as below:
sqlplus -silent $user/$pass@dbname <<END
from table_name where col4=$1;
Now I want to access all these variables i.e.... (9 Replies)
Discussion started by: dips_ag
7. Shell Programming and Scripting
I want to take input from one script like :
1. Enter ip address :
2. Enter port :
Now, I want to -
a. Store these in variables,
b. Call a separate script (say, x) from this script (say, y)
c. And use the stored variables in the called script (i.e. in script 'x').
How do I... (5 Replies)
Discussion started by: angshuman_ag
8. Shell Programming and Scripting
I have 2 scripts.The first script greps something and prints it
ccc="grep something and cut something"
When you run this it gives a value say "100"
I have b.sh and I have
When I run... (7 Replies)
Discussion started by: gubbu
9. Shell Programming and Scripting
Ok, I sort of need to create a command files that will be ftped to another server to run.
I have some input variable that will need to be read, and then transformed into another script file. Here are some examples.
passing in ./outputCmd.sh nh8oaxt Release_4_0... (1 Reply)
Discussion started by: orozcom
10. Shell Programming and Scripting
How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ?
I've given portion of the script here to explain the problem.
Portion of Script 1
tmp=`a.ksh p1 p2 p3`
# error processing
-----... (10 Replies)
Discussion started by: rajarkumar
escape(1) Mail Avenger 0.8.3 escape(1)
escape - escape shell special characters in a string
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
bodytest reject_bcc `escape "$RECIPIENT"`
The Mail Avenger home page: <http://www.mailavenger.org/>.
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
Mail Avenger 0.8.3 2012-04-05 escape(1)