9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
2. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
3. Shell Programming and Scripting
I am using ksh. I want to know how can we make any function to return string or double value.
I dont want to use the global variables. (5 Replies)
Discussion started by: PRKS
5 Replies
4. Shell Programming and Scripting
I have write a shell function to get the maximum of a vector.
However, the returned value from the function is not always
the correct one.
Here is the script:
maxval()
{
local max j i size arrval
size=$1 ; shift
max=-999999999
i=0
while
do
arrval="$1"
if
then
... (5 Replies)
Discussion started by: fl0r10
5 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
6. Shell Programming and Scripting
how to return value from function and print from main program???
And also I need to return true or false... Is it possible? (5 Replies)
Discussion started by: darshakraut
5 Replies
7. Shell Programming and Scripting
Hi all
I would like to know if there is a way to return an array for a function.
As I know function can return all the contents in an array, I want to return an array type. (6 Replies)
Discussion started by: dophine
6 Replies
8. Shell Programming and Scripting
Hi
I have a doubt in the way the variables inside a function are treated .
if a function is called from the main script directly, the variables inside them act as global variables.
however if the return value of the function is stored to some other variable in the main script as shown,... (3 Replies)
Discussion started by: prez
3 Replies
9. UNIX for Dummies Questions & Answers
I need to run a 4ge from within my shell script and capture the string value that is being returned into a unix variable. I have tried the back ticks to no avail. I know it is returning because I did get the returned value to go to my screen at one point..
What I have is:
sendlist =... (3 Replies)
Discussion started by: jeniferz
3 Replies