10-26-2001
Sorry for the double post.
How does the "pid=$!" command reveal the value of the ! variable for the process invoked in the "emacs file.txt&" command?
Is the "pid=$!" command issued separately to the emacs command, or is it on the same command line?
Essentially, all I want to do is 'echo' the value of the PID for each program execution command.
Could you please show me an example?
Many thanks.
10 More Discussions You Might Find Interesting
1. Programming
I have written a program to collect some performance metrics on and AIX box, but I'm having difficultly getting the process information.
I'm lead to believe that I'm not getting the correct information because I'm trying to run the program on AIX 5.1 (5100-03), but I'm not convinced as the... (0 Replies)
Discussion started by: StuBob
0 Replies
2. Shell Programming and Scripting
Hi Friends :p
I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies
3. Solaris
hi all,
Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have.
a) kick start the executable
b) get the pid
c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies
4. Linux
I am trying to submit a background process on a remote machine using
ssh -f remote-host "sh my-process.sh"
Normally the process will be submitted and control returned to the local machine (even when the process is running on the remote machine)
I want to get the process id of the submitted... (4 Replies)
Discussion started by: superuser84
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
6. Shell Programming and Scripting
Hi
I have written a shell script to find and kill the particular process. Here in shell script i have written the code like
cnt = $(ps -ef | grep Shree)
echo $cnt
I am getting the output
root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp
Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies
7. Shell Programming and Scripting
Hi all,
i was able to redirect pid of process to a file in the following way
ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid
it works fine but if one folder name caontains space its not working like below
ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies
8. Programming
Hi
I use linux OS.
I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name.
I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies
9. AIX
Hi
I would like to know more about swapper process..
I knew that swapper is the first process with PID#0, used to perform process swap operations. It used to swap entire processes
But sometimes I find swapper process with PID#264
So my doubt is how many swapper process can exist in a system?... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
10. AIX
HI,
i used
ps -ef | grep 3539052 | grep -v grep
and i got a output like ths
root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd
but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies
LEARN ABOUT LINUX
infobrowser
INFO(1) User Commands INFO(1)
NAME
info - read Info documents
SYNOPSIS
info [OPTION]... [MENU-ITEM...]
DESCRIPTION
Read documentation in Info format.
Frequently-used options:
-a, --all
use all matching manuals
-k, --apropos=STRING
look up STRING in all indices of all manuals
-d, --directory=DIR
add DIR to INFOPATH
-f, --file=MANUAL
specify Info manual to visit
-h, --help
display this help and exit
--index-search=STRING
go to node pointed by index entry STRING
-n, --node=NODENAME
specify nodes in first visited Info file
-o, --output=FILE
output selected nodes to FILE
-O, --show-options, --usage
go to command-line options node
--subnodes
recursively output menu items
-v, --variable VAR=VALUE
assign VALUE to Info variable VAR
--version
display version information and exit
-w, --where, --location
print physical location of Info file
The first non-option argument, if present, is the menu entry to start from; it is searched for in all 'dir' files along INFOPATH. If it is
not present, info merges all 'dir' files and shows the result. Any remaining arguments are treated as the names of menu items relative to
the initial node visited.
For a summary of key bindings, type H within Info.
EXAMPLES
info show top-level dir menu
info info-stnd
show the manual for this Info program
info emacs
start at emacs node from top-level dir
info emacs buffers
select buffers menu entry in emacs manual
info emacs -n Files
start at Files node within emacs manual
info '(emacs)Files'
alternative way to start at Files node
info --show-options emacs
start at node with emacs' command line options
info --subnodes -o out.txt emacs
dump entire emacs manual to out.txt
info -f ./foo.info
show file ./foo.info, not searching dir
REPORTING BUGS
Email bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org.
Texinfo home page: http://www.gnu.org/software/texinfo/
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for info is provided by the texinfo-doc-nonfree package as a Texinfo manual. If this package is installed at your
site, the command
info info
should give you access to the complete manual. (Or, if you have Emacs, M-x info will lead to the manual.)
info 6.5 February 2018 INFO(1)