10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a shell script (script.sh) in which we are calling java code which asks for
Username:
Password:
for authentication purpose
currently we are passing the credential manually and run the script.
but I am trying
echo -e "user_id\npassword" | script.sh
but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
2. Programming
Hello
Please i want to pass parameter (the string s) to the shell script:
Quote:
String s="Hello";
Process process = Runtime.getRuntime().exec("sh script1.sh");
How can i do please?
Thank you (0 Replies)
Discussion started by: chercheur857
0 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement to work on script, it should take either of arguments.
wrote it as below.
#!/bin/bash
usage() {
echo "$0: missing argument OR invalid option !
Usage : $0 -m|-r|-d
}
while getopts mrdvh opt; do
case "$opt" in
m) monitor_flag=monitor;;... (1 Reply)
Discussion started by: ramanaraoeee
1 Replies
4. Shell Programming and Scripting
Hi Gurus,
I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass.
The script has code as below.
ORACLE_SID=$1
DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON;
echo... (3 Replies)
Discussion started by: Sabari Nath S
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a very small requirement where i need to pass command output as an argument while invoking the shell script..
I need to call like this
sh testscript.sh ' ls -t Appl*and*abc* | head -n 1'
This will list one file name as ana argument..
I will be using "$1" in the shell... (2 Replies)
Discussion started by: pssandeep
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am facing a problem to pass command line arguments that looks like
<script name> aa bb "cc" dd "ee"
I want to pass all 5 elements include the " (brackets). when I print the @ARGV the " disappear. I hope I explain myself
Regards,
Ziv (4 Replies)
Discussion started by: zivsegal
4 Replies
7. Shell Programming and Scripting
i have to pass an integer value to shell script which will mail the values to users.
I am able to pass string values like this.
try {
String strCmdToRun1 = new String { "sh", "mail.sh","hello"};
Process p1 = rtime.exec(strCmdToRun1);
BufferedReader output... (1 Reply)
Discussion started by: naveensraj
1 Replies
8. Shell Programming and Scripting
Hi,
Lets say I have a script "ss" which does this
read abc
echo $abc
read pqr
echo $pqr
Now if I want to pass and argument to only "abc" how do I do it.
If I do
echo "somevalue" | ss, it does not prompt for pqr and its value comes out as blank.
Any help is appreciated
Thanks
P (6 Replies)
Discussion started by: patjones
6 Replies
9. Shell Programming and Scripting
Hi all,
I'm new to Shell scripting. In my shell script for Bourne shell, the script accepts a date parameter which is optional. If the value is supplied, the supplied value should be assigned to a variable. If not, the current date will be assigned to the variable. My script is like this.
#!... (9 Replies)
Discussion started by: sumesh.abraham
9 Replies
10. Shell Programming and Scripting
Dear All,
I have one script which accepts database name and user_id from the user, i have another script that will unload the data from all the tables based on the user_id accepted by the user. How can i pass the user_id from the 1st script to the other. My OS is sun solaris. Thanks in... (3 Replies)
Discussion started by: lloydnwo
3 Replies