09-21-2017
I don't understand half your question, and you didn't bother to answer mine, so we are at an impasse.
4 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to code a script, which will run via cron, every 30 minutes.
The script will read a file containing a date&time and number (which represents disk space). The file gets appended to every 30 minutes. Here's a sample of the file:
CPU 1:04/25/02 1:00 am:1972554
CPU 1:04/25/02 1:30... (1 Reply)
Discussion started by: moon
1 Replies
2. Shell Programming and Scripting
Hello,
I want a script that will scan the file /etc/httpd/conf/httpd.conf and the folder /etc/httpd/libexec/
-bash-2.05b# grep mod_r /etc/httpd/conf/httpd.conf
LoadModule rewrite_module libexec/mod_rewrite.so
AddModule mod_rewrite.c
-bash-2.05b#
-bash-2.05b# find... (4 Replies)
Discussion started by: fed.linuxgossip
4 Replies
3. Shell Programming and Scripting
This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep
Obviosly that hasnt worked,
Any... (8 Replies)
Discussion started by: jay02
8 Replies
4. UNIX for Beginners Questions & Answers
Hi There
I have to wrote a script where I am able to echo a result of an SQL script, however I want to be able to send an email to myself when it is more than 0 (so whenever a value is returned) is this possible?
I tried one way from looking on the web but this didn't work, I have added my... (8 Replies)
Discussion started by: simpsa27
8 Replies
LEARN ABOUT NETBSD
system
SYSTEM(3) BSD Library Functions Manual SYSTEM(3)
NAME
system -- pass a command to the shell
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int
system(const char *string);
DESCRIPTION
The system() function hands the argument string to the command interpreter sh(1). The calling process waits for the shell to finish execut-
ing the command, ignoring SIGINT and SIGQUIT, and blocking SIGCHLD.
If string is a NULL pointer, system() will return non-zero, if the command interpreter is available, or zero if none is available. Other-
wise, system() returns the termination status of the shell in the format specified by waitpid(2).
RETURN VALUES
If a child process cannot be created, or the termination status of the shell cannot be obtained, system() returns -1 and sets errno to indi-
cate the error. If execution of the shell fails, system() returns the termination status for a program that terminates with a call of
exit(127).
SEE ALSO
sh(1), execve(2), waitpid(2), popen(3), shquote(3)
STANDARDS
The system() function conforms to ANSI X3.159-1989 (``ANSI C89'') and IEEE Std 1003.2-1992 (``POSIX.2'').
CAVEATS
Never supply the system() function with a command containing any part of an unsanitized user-supplied string. Shell meta-characters present
will be honored by the sh(1) command interpreter.
BSD
August 2, 2007 BSD