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)
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)
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)
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)
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)
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)
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
LEARN ABOUT REDHAT
pidof
PIDOF(8) Linux System Administrator's Manual PIDOF(8)NAME
pidof -- find the process ID of a running program.
SYNOPSIS
pidof [-s] [-x] [-o omitpid] [-o omitpid..] program [program..]
DESCRIPTION
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems
used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in
/etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead.
OPTIONS -s Single shot - this instructs the program to only return one pid.
-x Scripts too - this causes the program to also return process id's of shells running the named scripts.
-o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof pro-
gram, in other words the calling shell or shell script.
NOTES
pidof is simply a (symbolic) link to the killall5 program, which should also be located in /sbin.
When pidof is invoked with a full pathname to the program it should find the pid of, it is reasonably safe. Otherwise it is possible that
it returns pids of running programs that happen to have the same name as the program you're after but are actually other programs.
SEE ALSO shutdown(8), init(8), halt(8), reboot(8)AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
01 Sep 1998 PIDOF(8)