10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I have been trying to work on a simple shell script that will just add the two argument passed to it. Here is what i tried :
#!/bin/bash
welcome(){
echo "Welcome to this Progg. which will accept two parameter"
}
main_logic(){
arg=$#
echo "Number of argument passed is... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
2. Shell Programming and Scripting
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Discussion started by: a1_win
7 Replies
3. Shell Programming and Scripting
Hi i have written a shell script that takes only single ip address from the user and calculates its latency and reliability, can you please tell me that what should be done if i want that user should enter 100 or 1000 ip address (5 Replies)
Discussion started by: Preeti_17
5 Replies
4. Shell Programming and Scripting
I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through...
Script that i am using is below :
#!/bin/bash
sum=0
for i in $@
do
sum=$sum+$1
echo $sum
shift
done
I am executing the script as... (3 Replies)
Discussion started by: mukulverma2408
3 Replies
5. Shell Programming and Scripting
Can someone let me know how could I achieve this
In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies
6. Shell Programming and Scripting
Hi All,
I want to pass array of argument from Java to a shell script.I can use process builder api and its exec() method to call the script,but the question is how to receive the parameter in the script.
Thanks in advance
---------- Post updated at 10:00 PM ---------- Previous update was... (1 Reply)
Discussion started by: Abhijeet_Atti
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
If not running a shell script file in current shell (. ./fileName) then $0 represents the executable file name. But in case of invoking shell script file in current shell then i m getting "$0 as -bash" . In such case how can i get the program name (running shell script file name)?
Thanks, (2 Replies)
Discussion started by: painulyarun
2 Replies
8. 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
9. Shell Programming and Scripting
All,
I am having a shell script and i will pass different argument diferent time . Please tell me how can i find the last argument that i passsed each time when i exec the script.
Thanks,
Arun. (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
10. Shell Programming and Scripting
how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.
rmjoe123@hotmail.com has '@' sign and followed by a '.'
to be more... (1 Reply)
Discussion started by: rmjoe
1 Replies