Sponsored Content
Full Discussion: how2 shell cmd into variable
Top Forums Shell Programming and Scripting how2 shell cmd into variable Post 302272473 by jwzumwalt on Tuesday 30th of December 2008 04:57:48 PM
Old 12-30-2008
Your fast, Thanks!

Thanks, I knew I had something small biting me in the rump Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

How to get a result of a cmd into variable?

Hi , I am trying following . I need to get a result of an autosys cmd into a unix variable. The autosys cmd is autostatus -G jpm_day_today Please help me in storing the value returned by this cmd into a unix variable. Appreciate your time to read this post. (1 Reply)
Discussion started by: manchau
1 Replies

2. HP-UX

Nohup shell with REMSH cmd => SIGTTIN

Hi, I have a shell with 2 remsh commands I run my job with the following command nohup job1 >log1 2>log2 & The job 1 has 2 remsh commands: remsh host1 -l oracle /l1/oracle/script/test_remsh.sh remsh host1 -l oracle /l1/oracle/script/test_remsh2.sh I receive SIGTTN signal And 2 process stay... (2 Replies)
Discussion started by: brandouy
2 Replies

3. UNIX for Dummies Questions & Answers

Redirect to a Variable? Or is it cmd cap?

Hi, Im reading an ANSI text file and greping for a pattern. Then i cut what i dont need from that pattern. So now i just have what i need. What i have now just so happens to be a constant integer. How can i save this integer in a varaible? Or do i use command capture in some form? cat... (2 Replies)
Discussion started by: oxoxo
2 Replies

4. Shell Programming and Scripting

Interaction shell cmd prompt

hi , how do i interact with the shell prompt. i need no. of args to be dynamic e.g $> type the no of args: <input from keyboard> Enter the 1 st arg : <input from keyboard> Enter the 2nd arg : <input from keyboard> ......... ......... let me know how to do it ... (1 Reply)
Discussion started by: adityamahi
1 Replies

5. UNIX for Dummies Questions & Answers

how2 get single char from keyboard w/o enter

I am writing a bash shell menu and would like to get a char immediately after a key is pressed. This script does not work but should give you an idea of what I am trying to do.... Thanks for the help #! /bin/bash ANSWER="" echo -en "Choose item...\n" until do $ANSWER = $STDIN ... (2 Replies)
Discussion started by: jwzumwalt
2 Replies

6. Shell Programming and Scripting

open terminal to run cmd using shell script

i want the shell script to open the terminal and in that terminal i want to run a command specified in the script... how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies

7. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

8. Shell Programming and Scripting

How to input the return value (1 or 0) ping cmd to a variable

Hi I would like to ask about my plan script I have this several workstation want to monitor and execute a command without logging it we use "rsh $host "<command>" i create csh script using foreach to loop my several workstation, my problem with the rsh command is if it encounter a... (3 Replies)
Discussion started by: jao_madn
3 Replies

9. Shell Programming and Scripting

set output of linux cmd as a variable in .exp

I am trying to make a script to take commands from a .txt file ( line by line) and pass it using send ( used in another function ) what i am trying to achieve is : set nol "`grep '' ${exp_path2}/cmdlist.txt | wc -l `" as in shell script nol=`grep '' $exp_path2/cmdlist.txt | wc -l` ... (0 Replies)
Discussion started by: dixyantar
0 Replies

10. Shell Programming and Scripting

Problem assigning cmd output to variable then using in IF statement

Hi, I'm using the bourn shell on a Sun Solaris Unix system. I am relatively new to UNIX scripting so please bear with me... I'm having a couple issues: 1) I need to have a variable $FSIZE set with the output of a command each time the script runs. (the command looks for a file and... (8 Replies)
Discussion started by: dqrgk0
8 Replies
RUMP_LWPROC(3)						   BSD Library Functions Manual 					    RUMP_LWPROC(3)

NAME
rump_lwproc -- rump process/lwp management LIBRARY
rump kernel (librump, -lrump) SYNOPSIS
#include <rump/rump.h> int rump_pub_lwproc_rfork(int flags); int rump_pub_lwproc_newlwp(pid_t pid); void rump_pub_lwproc_switch(struct lwp *l); void rump_pub_lwproc_releaselwp(); struct lwp * rump_pub_lwproc_curlwp(); DESCRIPTION
In a normal operating system model a process is a resource container and a thread (lwp) is the execution context. Every lwp is associated with exactly one process, and a process is associated with one or more lwps. The current lwp (curlwp) indicates the current process and determines which resources, such as UID/GID, current working directory, and file descriptor table, are currently used. These basic princi- ples apply to rump kernels as well, but since rump uses the host's thread and process context directly, the rules for how thread context is determined are different. In the rump model, each host thread (pthread) is either bound to a rump kernel lwp or accesses the rump kernel with an implicit thread con- text associated with pid 1. An implicit thread context is created every time the rump kernel is entered and disbanded upon exit. While con- venient for occasional calls, creating an implicit thread uses a shared resource which can become highly contended in a multithreaded situa- tion. It is therefore recommended that dedicated threads are created. The association between host threads and the rump kernel curlwp is left to the caller. It is possible to create a dedicated host thread for every rump kernel lwp or multiplex them on top of a single host thread. After rump lwps have been created, switching curlwp is very cheap -- faster than a thread context switch on the host. In case multiple lwps/processes are created, it is the caller's responsibility to keep track of them and release them when they are no longer necessary. Like other rump kernel resources, procs/lwps will be released when the process hosting the rump kernel exits. rump_pub_lwproc_rfork() Create a process, one lwp inside it and set curlwp to the new lwp. The flags parameter controls how file descriptors are inherited from the parent. By default (flags=0) file descriptors are shared. Other options are: RUMP_RFFDG Copy file descriptors from parent. This is what fork(2) does. RUMP_RFCFDG File descriptors neither copied nor shared, i.e. new process does not have access to the parent's file descriptors. This routine returns 0 for success or an errno indicating the reason for failure. The new process id can be retrieved in the normal fashion by calling rump_sys_getpid(). rump_pub_lwproc_newlwp(pid) Create a new lwp attached to the process specified by pid. Sets curlwp to the new lwp. This routine returns 0 for success or an errno indicating the reason for failure. rump_pub_lwproc_switch(l) Sets curlwp to l. In case the new thread is associated with a different process than the current one, the process context is also switched. The special value NULL sets curlwp to implicit context. Switching to an already running lwp, i.e. attempting to use the same curlwp in two host threads simultaneously causes a fatal error. rump_pub_lwproc_releaselwp() Release curlwp and set curlwp to context. In case curlwp was the last thread inside the current process, the process container is also released. Calling this routine without a dedicated curlwp is a fatal error. rump_pub_lwproc_curlwp() Returns curlwp or NULL if the current context is an implicit context. SEE ALSO
getpid(2), rump(3) HISTORY
rump_lwproc first appeared in NetBSD 6.0. BSD
January 2, 2011 BSD
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy