03-30-2006
2 is the file descriptor for errors. Also 1 is the file descriptor for standard output and 0 is standard input.
9 More Discussions You Might Find Interesting
1. Programming
i made a lot of processes. here is the code:
main()
{
printf("\nEnter K="); scanf("%d",&k);
printf("Enter L="); scanf("%d",&l);
printf("\nFather id=%d\n",getpid());
x=0;
makechild();
sleep(2);
return 1;
}
int makechild()
{
for(q=1;q<=k;q++)
{
if(f=fork())
{
... (5 Replies)
Discussion started by: bb666
5 Replies
2. Shell Programming and Scripting
how do you pipe the results to next statement as argument?
somecommand | grep $result somefile
how do you reference $result with?? (12 Replies)
Discussion started by: convenientstore
12 Replies
3. Programming
I want to compile all files in my directory i wrote
find *.c | gcc -o * *.c
but it dosent work :( Help pliz (12 Replies)
Discussion started by: rzili
12 Replies
4. Shell Programming and Scripting
Hi, guys:
I am working on my shell using c. How can I use pipe to implement the following?
ls -l 1>> | grep hellp 1<< 2>> | less 2<<
(the output of ls goes to grep, and the output of grep goes to less)
Thanks
Please use and tags when posting code, data or logs etc. to preserve... (1 Reply)
Discussion started by: tomlee
1 Replies
5. Shell Programming and Scripting
Hi All ,
Is there any way to replace the pipe ( | ) with the broken pipe (0xA6) in unix (1 Reply)
Discussion started by: saj
1 Replies
6. Shell Programming and Scripting
Hi all,
I would like to use properly an input pipe, like this :
cat myFile.txt | myCommand.shI always find this solution :
while read line; do ...; donebut I have a great lost of performance !
On a big file, with a simple grep, I can spend 2400 times more time ! oO
(from 0,023sec to 1m)... (4 Replies)
Discussion started by: LeNouveau
4 Replies
7. Shell Programming and Scripting
Hi ,
Please help me resolve the below issue.
I need to combine the below two command into one.
grep 'ImanItemP' import.report| tr -s ' ' | cut -f2 -d ' ' > tmp.txt
fgrep -v -f tmp.txt input.txt > reuired file.txt
Thanks
Ramesh (4 Replies)
Discussion started by: ramesh12621
4 Replies
8. Shell Programming and Scripting
Hi,
I am trying to emulate the '|' functionality through pipe function call. I am passing the o/p of exec in parent as input to the exec in child. The buf is readin the o/p but the exec in child is not working. Can somebody checkout the code and point where am i going wrong or missing something.... (3 Replies)
Discussion started by: amejoish
3 Replies
9. Shell Programming and Scripting
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
LEARN ABOUT OPENSOLARIS
kiconv_close
kiconv_close(9F) Kernel Functions for Drivers kiconv_close(9F)
NAME
kiconv_close - code conversion descriptor deallocation function
SYNOPSIS
#include <sys/errno.h>
#include <sys/sunddi.h>
int kiconv_close(kiconv_t cd);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
cd Code conversion descriptor to be deallocated.
DESCRIPTION
The kiconv_close() function deallocates the conversion descriptor cd and all other associated resources allocated by the kiconv_open()
function.
RETURN VALUES
Upon successful completion, kiconv_close() returns 0; otherwise, it returns the following errno value to indicate the error:
EBADF The code conversion descriptor is invalid.
CONTEXT
kiconv_close() can be called from user or interrupt context.
EXAMPLES
Example 1 Closing the Code Conversion
The following example shows how to close the code conversion descriptor with error checking:
if (kiconv_close(cd) == EBADF) {
/* Code conversion descriptor is invalid. */
return (-1);
}
The following example shows how to close the code conversion descriptor without error checking:
(void) kiconv_close(cd);
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
iconv(3C), iconv_close(3C), iconv_open(3C), u8_strcmp(3C), u8_textprep_str(3C), u8_validate(3C), uconv_u16tou32(3C), uconv_u16tou8(3C),
uconv_u32tou16(3C), uconv_u32tou8(3C), uconv_u8tou16(3C), uconv_u8tou32(3C), attributes(5), kiconv(9F), kiconvstr(9F), kiconv_open(9F),
u8_strcmp(9F), u8_textprep_str(9F), u8_validate(9F), uconv_u16tou32(9F), uconv_u16tou8(9F), uconv_u32tou16(9F), uconv_u32tou8(9F),
uconv_u8tou16(9F), uconv_u8tou32(9F)
The Unicode Standard
http://www.unicode.org/standard/standard.html
SunOS 5.11 16 Oct 2007 kiconv_close(9F)