Sponsored Content
Full Discussion: Always pass SIGINT in ksh
Top Forums Shell Programming and Scripting Always pass SIGINT in ksh Post 302738071 by sapsid on Friday 30th of November 2012 09:52:49 AM
Old 11-30-2012
Always pass SIGINT in ksh

The following command will run and wait for input from the user.

/usr/sap/SAP/webdisp/wdispmon pf=/usr/sap/SAP/webdisp/profile

What I would like to do is (in one command):
- Add the above line to a ksh script
- Receive the output
- and send a SIGINT

I have seen many posts on how to catch a SIGINT with trap but I want to run this from cron and always send a SIGNT to the command.

Any help would be greatly appreciated.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to pass variable to SQLPLUS in a ksh script?

Hi, I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers. Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies

2. Programming

Problem with handling SIGINT

For a program I am designing, which involves handling the keyboard input Ctrl^c (SIGINT), it is taking ages for the program to actually recognise and perform the corresponding action whenever I run it and hit Ctrl^C at the CL. I have to do at least 3 Ctrl^Cs before the program will actually... (3 Replies)
Discussion started by: JamesGoh
3 Replies

3. Shell Programming and Scripting

How to pass ksh array to oracle

Hi all.. Does anyone know have an example of passing the contents of a ksharray to oracle? basically I am looking to loop through the contents of a file and store each line into a bash ksh. Once i have this I can then pass the array into an oracle procedure that accepts an array as an... (1 Reply)
Discussion started by: kiranlalka
1 Replies

4. Shell Programming and Scripting

ksh variable pass to awk

I'm trying to store the response from a nawk command inside of a ksh script. The command is: text=$(nawk -F: '$1 ~ /${imgArray}/ {print $2}' ${etcDir}/captions.txt) From what I can tell, the imgArray variable is not being expanding when it is inside the single quote ('). Is there something I... (4 Replies)
Discussion started by: meman1188
4 Replies

5. Shell Programming and Scripting

AIX ksh: how to pass variable to host shell

I have a script that "runs" a script. For example: ./runscript.ksh pcnmc01.ksh runscript puts pcnmc01.ksh into the background with log output going to the logfile. After executing the command, I get this output: Running script in the background: pcnmc01.ksh Logfile:... (2 Replies)
Discussion started by: Eben Yong
2 Replies

6. Shell Programming and Scripting

Pass a DDL statement to a KSH script

I need to pass a DDL statement into a ksh script & parse the statement. What is the best way to pass a DDL statement into a KSH script. ---------- Post updated at 09:28 AM ---------- Previous update was at 07:35 AM ---------- if the name of the script is test.ksh test.ksh "ALTER TABLE... (12 Replies)
Discussion started by: gayathree
12 Replies

7. UNIX for Dummies Questions & Answers

SIGINT issue

May i know what are the possible causes for SIGINT other than ctrl-c? Thanks (17 Replies)
Discussion started by: pandeesh
17 Replies

8. UNIX for Dummies Questions & Answers

How to pass a parameter to an alias in ksh?

I want to do something like this: alias cd2="cd /data_saves/$(/opt/bin/util/getcustdb -i $@)" Where /opt/bin/util/getcustdb is an inhouse script to lookup customer db name based on a provided id number Then when I use the alias I can cd2 4567 and have it run "/opt/bin/util/getcustdb -i... (3 Replies)
Discussion started by: JourneyRider
3 Replies

9. Shell Programming and Scripting

ksh script trying to pass a variable to edit a file

I'm trying to create a ksh script that will ask the user for the port number. $PORT1 is the variable I want to use that will contain whatever numbers the user inputs. The script would edit ports.txt file, search and delete "./serv 110.1.0.1.$PORT1 200;=3" . So if the user types 50243 then the... (5 Replies)
Discussion started by: seekryts15
5 Replies

10. Shell Programming and Scripting

How to pass and read an array in ksh shell script function.?

I'm able to read & print an array in varaible called "filelist" I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function. Unfortunately it does not print the entire array from inside the funstion's loop. #/bin/ksh... (5 Replies)
Discussion started by: mohtashims
5 Replies
pfexec(1)							   User Commands							 pfexec(1)

NAME
pfexec, pfsh, pfcsh, pfksh - execute a command in a profile SYNOPSIS
/usr/bin/pfexec command /usr/bin/pfexec -P privspec command [ arg ]... /usr/bin/pfsh [ options ] [ argument ]... /usr/bin/pfcsh [ options ] [ argument ]... /usr/bin/pfksh [ options ] [ argument ]... DESCRIPTION
The pfexec program is used to execute commands with the attributes specified by the user's profiles in the exec_attr(4) database. It is invoked by the profile shells, pfsh, pfcsh, and pfksh which are linked to the Bourne shell, C shell, and Korn shell, respectively. Profiles are searched in the order specified in the user's entry in the user_attr(4) database. If the same command appears in more than one profile, the profile shell uses the first matching entry. The second form, pfexec -P privspec, allows a user to obtain the additional privileges awarded to the user's profiles in prof_attr(4). The privileges specification on the commands line is parsed using priv_str_to_set(3C). The resulting privileges are intersected with the union of the privileges specified using the "privs" keyword in prof_attr(4) for all the user's profiles and added to the inheritable set before executing the command. USAGE
pfexec is used to execute commands with predefined process attributes, such as specific user or group IDs. Refer to the sh(1), csh(1), and ksh(1) man pages for complete usage descriptions of the profile shells. EXAMPLES
Example 1 Obtaining additional user privileges example% pfexec -P all chown user file This command runs chown user file with all privileges assigned to the current user, not necessarily all privileges. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), ksh(1), profiles(1), sh(1), exec_attr(4), prof_attr(4), user_attr(4), attributes(5) SunOS 5.11 3 Mar 2003 pfexec(1)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy