i'm using SunOS 5.7 and I know theres a ls option for seeing what kind of files are in a directory. I was wondering if there was a ls option that could see if the files are txt or files that can be opened in vi (1 Reply)
How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm?
In older versions of Unix, this used to work, but not in Sun Solaris.
Thanks (4 Replies)
Running HP 11.31 on a HP3600. But when I log in as a user the who command works but if I use an option like "who -m" I get nothing. Any thoughts on what is causing this problem. (11 Replies)
Hi,
what is the meaning of -n option before the grep command ?
grep command searches for the specified string in the file tmp_crontab.txt
but what does -n mean ?
With Regards (1 Reply)
Hi Friends,
I could see following oracle process in the glance command. i see nothing running in the database although. I tried google it but no success. Another team ,which needs all the processes on the server is complaining. Can someone help me what exactly are these sessions/ how to ... (1 Reply)
I am just learning shell scripting and already I found out I have the bad habit of thinking that it is similar to php or c.
I learned some basics and now encountered this problem:
On shell it is possible to type:
$ date --date="2009-10-10 09:08:34"
Sat Oct 10 09:08:34 CEST 2009
... (2 Replies)
Dear all,
I want to execute fsck command,can i execute fsck command without any option
asking for more confidence.
Thanks and Regards
Monoj Das (1 Reply)
Hi folks,
I totally dislike asking questions in forums but this one eats up to much of my time I need to spend on other topics.
I have a shell-script in which I call a terminal.
I want to invoke bash inside the terminal and print a message inside bash with aid of a here document.
See... (7 Replies)
Discussion started by: bluntroller
7 Replies
LEARN ABOUT DEBIAN
explain_system_or_die
explain_system_or_die(3) Library Functions Manual explain_system_or_die(3)NAME
explain_system_or_die - execute a shell command and report errors
SYNOPSIS
#include <libexplain/system.h>
void explain_system_or_die(const char *command);
void explain_system_success_or_die(const char *command);
int explain_system_success(const char *command);
DESCRIPTION
These functions may be used to execute commands via the system(3) function, and report the results.
explain_system_or_die
void explain_system_or_die(const char *command);
The explain_system_or_die function is used to call the system(3) system call. On failure an explanation will be printed to stderr,
obtained from explain_system(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
int status = explain_system_or_die(command);
command The command, exactly as to be passed to the system(3) system call.
Returns:
This function only returns on success, see system(3) for more information. On failure, prints an explanation and exits.
explain_system_success_or_die
void explain_system_success_or_die(const char *command);
The explain_system_success_or_die function is used to call the system(3) system call. On failure, including any exit status other than
EXIT_SUCCESS, an explanation will be printed to stderr, obtained from explain_system(3), and then the process terminates by calling
exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_system_success_or_die(command);
command The command, exactly as to be passed to the system(3) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
explain_system_success
int explain_system_success(const char *command);
The explain_system_success function is used to call the system(3) system call. On failure, including any exit status other than EXIT_SUC-
CESS, an explanation will be printed to stderr, obtained from explain_system(3). However, the priniting of an error message does not also
cause exit(2) to be called.
This function is intended to be used in a fashion similar to the following example:
int status = explain_system_success(command);
command The command, exactly as to be passed to the system(3) system call.
Returns:
the value returned by the system(3) system call. In all cases other than EXIT_SUCCESS, an error message will also have been
printed to stderr.
SEE ALSO system(3)
execute a shell command
explain_system(3)
explain system(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_system_or_die(3)