I need to store process runtime into a file, currently the command i use was:
time ls >> abc.txt
however, this command store the executed result of ls into the txt file but not the time command result.
Anyone know how to store the "time ls" result? Please advise me! Thanks in advance :) (5 Replies)
Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow
/usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Hi all,
i would like to write the shell script program, it can monitor the access_log "real time"
when the access_log writing the line contain "abcdef" the program will be "COPY" this line into a file named "abcdef.txt", do the same thing if the contain "123456" "COPY" it into a file named... (3 Replies)
Hi,
I would like to list files: ls *.hdf
But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt
I have tried:
ls *.hdf | tee test.txt
However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Hi
i am compiling a source code by make command.
i want to redirect the output of make to a file but at the same time i want to see the output in terminal.
how to do this ?.
please suggest your idea.
thanks in advance.
Saravana
---------- Post updated at 05:24 PM ----------... (2 Replies)
How to redirect your o/p to many files without using for loop.
For example:-
1-echo "blablabla" > out01 OUT
2-echo "blablabla" 1>out01 1>OUT
3-echo "blablabla" 1>&out01 1>&OUT
the above code does not work!
in "1" only the o/p goes to out01
in "2" & "3" the o/p goes to OUT
... (4 Replies)
I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like,
echo "Runtimes for servlet 4, 100K structures" > test_times.txt
echo "" >> test_times.txt
echo "runs where N=10" >> test_times.txt
echo... (7 Replies)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
LEARN ABOUT OPENSOLARIS
mbtowc
mbtowc(3C) Standard C Library Functions mbtowc(3C)NAME
mbtowc - convert a character to a wide-character code
SYNOPSIS
#include <stdlib.h>
int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n);
DESCRIPTION
If s is not a null pointer, mbtowc() determines the number of the bytes that constitute the character pointed to by s. It then determines
the wide-character code for the value of type wchar_t that corresponds to that character. (The value of the wide-character code correspond-
ing to the null byte is 0.) If the character is valid and pwc is not a null pointer, mbtowc() stores the wide-character code in the object
pointed to by pwc.
A call with s as a null pointer causes this function to return 0. The behavior of this function is affected by the LC_CTYPE category of the
current locale. At most n bytes of the array pointed to by s will be examined.
RETURN VALUES
If s is a null pointer, mbtowc() returns 0. If s is not a null pointer, mbtowc() returns 0 (if s points to the null byte), the number of
bytes that constitute the converted character (if the next n or fewer bytes form a valid character), or -1 and may set errno to indicate
the error (if they do not form a valid character).
In no case will the value returned be greater than n or the value of the MB_CUR_MAX macro.
ERRORS
The mbtowc() function may fail if:
EILSEQ Invalid character sequence is detected.
USAGE
The mbtowc() function can be used safely in multithreaded applications, as long as setlocale(3C) is not being called to change the locale.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
|ATTRIBUTE TYPE |ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
SEE ALSO mblen(3C), mbstowcs(3C), setlocale(3C), wcstombs(3C), wctomb(3C), attributes(5), standards(5)SunOS 5.11 1 Nov 2003 mbtowc(3C)