Sponsored Content
Top Forums Shell Programming and Scripting Its Urgent ::: Passing Argument during Script Execution Post 302429057 by ks47 on Saturday 12th of June 2010 01:40:24 AM
Old 06-12-2010
Question Its Urgent ::: Passing Argument during Script Execution

Dear All,
Plz, can someone clarify me regarding the below.


Actually I want to write the script that will get the some parameter like "yes" or "No" as we wish during execution without prompting for entering that word. Plz tell me...


Its Urgent..


Thanks & Regards
Kuldeep Sharma
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Passing argument to awk script

I am writing a shell script. Now i need to read in a string and send it to an awk file to compare and search for compatible record. I wrote it like tat: read serial | awk -f generate.awk data.dat p/s: the data file got 6 field. According to an expert, we can write it like tat: read... (1 Reply)
Discussion started by: AkumaTay
1 Replies

2. Shell Programming and Scripting

Passing argument from one script to other

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

3. Shell Programming and Scripting

Problem when passing argument to a shell script

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

4. Shell Programming and Scripting

Need to run the script by argument passing

Hi All, I have a question regarding running this script by passing an argument, for example ./ShellParse.sh sun, how do i do that? So i want when i pass argument sun, it shouild execute things inside the for loop. I want to support some other platforms too, so there are more for loops to... (3 Replies)
Discussion started by: asirohi
3 Replies

5. Shell Programming and Scripting

Passing argument to system call in awk script

So, I have this script. It reads a CSV file that has a mixture of object names with IP addresses (parsing out that part I have working), and object names which have a DNS name. I want to be able to run a "dig +short" based off of the name given to me in the line of the awk script, and then deal... (6 Replies)
Discussion started by: mikesimone
6 Replies

6. Shell Programming and Scripting

Passing value as a command line argument in awk script.

I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code. awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat But now I want to pass two parameter as a command line argument... (4 Replies)
Discussion started by: humaemo
4 Replies

7. Shell Programming and Scripting

Passing --usage as argument to awk script

I have the awk script below and things go wrong when I do awk -v dsrmx=25 -f ./checkSRDry.awk --usage I basically want to override the usual --usage and --help that awk gives. How do people usually handle this situation when you also want to supply your own usage and help concerning the... (2 Replies)
Discussion started by: kristinu
2 Replies

8. Shell Programming and Scripting

Passing argument from Java to Shell script

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

9. Shell Programming and Scripting

passing argument in script?

hi, I want to implement some function to perform following task if ; then $TEXT = "Data_0" else $TEXT = $1 fi if ; then $Lines = 45 else $Lines = $2 fi Kindly suggest, thanks (11 Replies)
Discussion started by: nrjrasaxena
11 Replies

10. Shell Programming and Scripting

Passing variable as an argument to another script

Hi, I am trying to pass a variable as an argument to another script. While substitution of variable, I am facing a problem. varaiable "a" value should be -b "FPT MAIN". When we pass "a" to another script, we are expecing it to get substitue as ./test.sh -b "FPT MAIN". But, it is getting... (9 Replies)
Discussion started by: Manasa Pradeep
9 Replies
sigsetjmp(3)						     Library Functions Manual						      sigsetjmp(3)

NAME
sigsetjmp, siglongjmp - Saves and restores the current execution context LIBRARY
Standard C Library (libc.a, libc.so) SYNOPSIS
#include <setjmp.h> int sigsetjmp( sigjmp_buf environment , int savemask); void siglongjmp( sigjmp_buf environment, int value); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: siglongjmp(), sigsetjmp(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies an address for a sigjmp_buf structure. Specifies whether the current signal mask should be saved. If this parameter contains a 0 (zero) value, sigsetjmp() does not save the signal mask. Otherwise, the function saves the signal mask. Specifies the value you want written to the execution context as the return value of the sigsetjmp() function. If you specify 0 (zero) in this parameter, the execution context contains a value of 1 as the sigsetjmp() return value. See the RETURN VALUES section for more information. DESCRIPTION
The sigsetjmp() and siglongjmp() functions are useful when handling errors and interrupts encountered in low-level functions of a program. The sigsetjmp() function saves the current stack context in the buffer specified by the environment parameter. If the value of the save- mask parameter is not 0 (zero), the sigsetjmp() function also saves the process' current signal mask as part of the calling environment. You use the buffer specified by the environment parameter in a later call to the siglongjmp() function. The siglongjmp() function restores the stack context and (optionally) signal mask that were saved by the sigsetjmp() function. After the siglongjmp() function runs, program execution continues as if the corresponding call to the sigsetjmp() function had just returned the value of the value parameter. The function that called the sigsetjmp() function must not have returned before the completion of the siglongjmp() function. Because it bypasses the usual function call and return mechanisms, the siglongjmp() function executes correctly in contexts of interrupts, signals, and any of their associated functions. However, if the siglongjmp() function is invoked from a nested signal handler (that is, from a function invoked as a result of a signal raised during the handling of another signal), the behavior is undefined. CAUTION
The results of the siglongjmp() function are undefined if one of the following is true: The siglongjmp() function is called with an envi- ronment parameter that was not previously set by the sigsetjmp() function The function that made the corresponding call to the sigsetjmp() function has already returned. If the siglongjmp() function detects one of these conditions, it calls the longjmperror() function. If longjmperror() returns, the program is aborted. The default version of longjmperror() displays an error message to standard error and returns. If you want your program to exit more gracefully, you can write your own version of the longjmperror() program. RETURN VALUES
After the siglongjmp() function is finished executing, program execution continues as if the corresponding call of the sigsetjmp() function just returned. In other words, the execution context saved by the corresponding sigsetjmp() function is in place and execution continues at the statement immediately following the call to the sigsetjmp() function. Part of that execution context is the return value from the sigsetjmp() function. When the sigsetjmp() function actually returns (before the call to the siglongjmp() function), that return value is 0 (zero). When the siglongjmp() function returns, the execution context con- tains a non-zero value as the return value from the sigsetjmp() function. The value you specify in the value parameter to the siglongjmp() function is written to the execution context as the return value for the sigsetjmp() function. You cannot cause the execution context to contain a 0 (zero) value for the sigsetjmp() return value. If you specify 0 in the value parameter, the execution context contains a 1 as the sigsetjmp() return value. RELATED INFORMATION
Routines: setjmp(3) Standards: standards(5) delim off sigsetjmp(3)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy