07-30-2014
You can either check the exit code of symaccess (passed back to the script in $?) or test / suppress stderr if it is your undesired test.
6 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I have a script that has an infile with system package information. For the most part the script is looking well. The only thing i need help is in testing for null entries and removing null data.
#!/usr/bin/ksh
for i in `cat /mwncps/bin/eco_pack`
do
NAME=`pkginfo -l |... (2 Replies)
Discussion started by: liketheshell
2 Replies
2. Solaris
Hi
Can anyone suggest me some documents for EMC clarion documents which I am going to use in the servers with solaris environments. (1 Reply)
Discussion started by: ningy
1 Replies
3. Shell Programming and Scripting
I'm using an text-to-speech synthesis in a script, and I need to redirect it's output to /dev/null
how can I do that ? And how to redirect the stream to his normal output then (sound card ) ?
thankx (2 Replies)
Discussion started by: firelink
2 Replies
4. Shell Programming and Scripting
Hi All,
This might be a basic question... I need to write a script to find all/any Speacial/Null/Control Chars and Print Line Numbers from an input file.
Output something like
Null Characters in File Name at : Line Numbers
Line = Print the line
Control Characters in File Name at : Line... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
5. Solaris
Hi All!
I have a two x6270 solaris 10, blade, connected to a EMC x4 storage appliance via fibre.
I have little knowledge of veritasfile system, and EMC x4, storage device, but I found out that one DG is in shared mode.
I need to split the configuration, to use only one server (blade).
The EMC... (1 Reply)
Discussion started by: fretagi
1 Replies
6. UNIX for Beginners Questions & Answers
I am working an some if then statements for a script.
I want to be able to check for alpha characters or empty out put then exit out.
if ]];
echo "Serial Number Invaild"
then exit 3;
How do I account if the output is empty or null in this in this statement.
Many thanks (6 Replies)
Discussion started by: andysensible
6 Replies
LEARN ABOUT OPENSOLARIS
setlabel
setlabel(3C) Standard C Library Functions setlabel(3C)
NAME
setlabel - define the label for pfmt() and lfmt()
SYNOPSIS
#include <pfmt..h>
int setlabel(const char *label);
DESCRIPTION
The setlabel() function defines the label for messages produced in standard format by subsequent calls to lfmt(3C) and pfmt(3C).
The label argument is a character string no more than 25 characters in length.
No label is defined before setlabel() is called. The label should be set once at the beginning of a utility and remain constant. A null
pointer or an empty string passed as argument will reset the definition of the label.
RETURN VALUE
Upon successful completion, setlabel() returns 0; otherwise, it returns a non-zero value.
EXAMPLES
The following code (without previous call to setlabel()):
pfmt(stderr, MM_ERROR, "test:2:Cannot open file
");
setlabel("UX:test");
pfmt(stderr, MM_ERROR, "test:2:Cannot open file
");
will produce the following output:
ERROR: Cannot open file
UX:test: ERROR: Cannot open file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
getopt(3C), lfmt(3C), pfmt(3C), attributes(5)
SunOS 5.11 29 Dec 1996 setlabel(3C)