12-21-2010
Ok after all i got my pid with: PID=$!
Thank you
---------- Post updated at 01:51 PM ---------- Previous update was at 12:55 PM ----------
I have another question ( not sure if i had to make a new thread)
Now that i have the PID i want to retrieve information about my process, using the command 'top'.
So far i have
top -b -d 1.0 -p $PID
which returns information while my process is running. When the process stops , top is still running. How can i stop it and proceed with my shell?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
I am new ot unix. So, can i write a shell(c shell or korn shell) program to access internet? I mean if I run the program, it can access specified url and then copy the html to a file? Can anyone help me? And how can make the program runs every 1 hr?
new comer (2 Replies)
Discussion started by: firebirdonfire
2 Replies
2. Shell Programming and Scripting
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32768 16016 52% 2271 14% /
/dev/hd2 4587520 1889420 59% 37791 4% /usr
/dev/hd9var 65536 12032 82% 518 4% /var
/dev/hd3 819200 637832 ... (1 Reply)
Discussion started by: sathyaac
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies
4. Shell Programming and Scripting
Hi,
Can anyone pls give a sample to execute a shell script from C program
Thanks (2 Replies)
Discussion started by: baigmd
2 Replies
5. Programming
Hi,
Can anyone give me a sample code to execute shell script from C program.
Thanks (6 Replies)
Discussion started by: baigmd
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am a complete newbie for unix. I have just installed mysql on my MAC. I was wondering every time I wanted to use mysql I had to ./mysql or sh mysql everytime on /usr/local/bin/mysql/bin. How can I execute the mysql program without using ./ or sh. I chmod +x already. And what do I have to... (3 Replies)
Discussion started by: noppanit
3 Replies
7. Shell Programming and Scripting
Hi All,
well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this...
Please see the below details...and read the details carefully.
I have written some code, logic is
1)from... (4 Replies)
Discussion started by: aish11
4 Replies
8. Shell Programming and Scripting
Hello,
I have a c program executable which I need to run inside a shell script.
But the c program runs in a subshell because of which all the actions done by the c program is not available to the current shell.
Is there any way to execute a C program binary executable in the current shell? (4 Replies)
Discussion started by: sachinverma
4 Replies
9. Ubuntu
My professor gave me a code with no errors.
When I compile it's fine, it doesn't show any errors, but when I try to execute it shows this:
line 3: syntax error near unexpected token '('
line 3: 'int main()'
I searched through the Internet but I couldn't find any solution. Please!!!... (1 Reply)
Discussion started by: rosiiieee
1 Replies
10. UNIX for Advanced & Expert Users
Hi there,
When I am trying to execute any shell script.
The shell script only execute line 1 and I notice that the rest o the program was not executed. Please advise.
# bash +x vmscript-4.sh
Even when I enter this command there is not output.
sudo su
cd /tmp
cp... (2 Replies)
Discussion started by: alvinoo
2 Replies
SECON(1) NSA SECON(1)
NAME
secon - See an SELinux context, from a file, program or user input.
SYNOPSIS
secon [-hVurtscmPRfLp] [CONTEXT]
[--file] FILE
[--link] FILE
[--pid] PID
DESCRIPTION
See a part of a context. The context is taken from a file, pid, user input or the context in which secon is originally executed.
-V, --version
shows the current version of secon
-h, --help
shows the usage information for secon
-P, --prompt
outputs data in a format suitable for a prompt
-u, --user
show the user of the security context
-r, --role
show the role of the security context
-t, --type
show the type of the security context
-s, --sensitivity
show the sensitivity level of the security context
-c, --clearance
show the clearance level of the security context
-m, --mls-range
show the sensitivity level and clearance, as a range, of the security context
-R, --raw
outputs the sensitivity level and clearance in an untranslated format.
-f, --file
gets the context from the specified file FILE
-L, --link
gets the context from the specified file FILE (doesn't follow symlinks)
-p, --pid
gets the context from the specified process PID
--pid-exec
gets the exec context from the specified process PID
--pid-fs
gets the fscreate context from the specified process PID
--current, --self
gets the context from the current process
--current-exec, --self-exec
gets the exec context from the current process
--current-fs, --self-fs
gets the fscreate context from the current process
--parent
gets the context from the parent of the current process
--parent-exec
gets the exec context from the parent of the current process
--parent-fs
gets the fscreate context from the parent of the current process
Additional argument CONTEXT may be provided and will be used if no options have been specified to make secon get it's context from another
source. If that argument is - then the context will be read from stdin.
If there is no arugment, secon will try reading a context from stdin, if that is not a tty, otherwise secon will act as though --self had
been passed.
If none of --user, --role, --type, --level or --mls-range is passed. Then all of them will be output.
SEE ALSO
chcon (1)
AUTHORS
James Antill (james.antill@redhat.com)
Security Enhanced Linux April 2006 SECON(1)