Sponsored Content
Full Discussion: Issue with writing a pipe
Top Forums Shell Programming and Scripting Issue with writing a pipe Post 303045379 by sea on Thursday 19th of March 2020 04:40:53 AM
Old 03-19-2020
Posted in wrong thread...
I dont see a delete option in "Additional Options" with advanced edit.
-> I see 'Close this thread after..."

Last edited by sea; 03-19-2020 at 05:53 AM.. Reason: Thought I had an open question on this, and then forgot to change to other thread for the actual post...
 

10 More Discussions You Might Find Interesting

1. Programming

pipe help

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

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

3. Programming

writing a pipe with a c telnet

Hi I have a problem writing a c program that makes a telnet connection and writes some command. The shell command is something like this: ------------------------------------------------------------------ > >telnet 141.111.231.132 3300 ENTER COMMAND: login "<--- I' wirte a command (ex... (5 Replies)
Discussion started by: fafo77
5 Replies

4. Shell Programming and Scripting

How can I use pipe

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

Replace pipe with Broken Pipe

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. UNIX for Dummies Questions & Answers

grep pipe filename print issue

uname -a SunOS mypc 5.10 Generic_141414-07 sun4v sparc SUNW,SPARC-Enterprise-T2000 uname -a SunOS mypc 5.10 Generic_144488-07 sun4v sparc SUNW,SPARC-Enterprise-T5220 find . -name "*.cer" -exec keytool -v -list -printcert -file {} \; | grep -i "Aug 03" Valid from: Mon Jan 29 00:00:00 GMT... (16 Replies)
Discussion started by: shifahim
16 Replies

7. Shell Programming and Scripting

Need assistance with a file issue and a terminal issue

Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Discussion started by: MrMagoo22
1 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. Shell Programming and Scripting

How to ignore Pipe in Pipe delimited file?

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

10. Shell Programming and Scripting

While read pipe input issue

Hello, I have an ffmpeg bash script which is working nice and I need to do the same for other sources. To create new scripts and to deal with multiple bash files sounds not logical. It is a bit hard to manage for me.. I wondered if it was possible to make my input file as variable. Then I... (1 Reply)
Discussion started by: baris35
1 Replies
pthread_key_create(3T)													    pthread_key_create(3T)

NAME
pthread_key_create(), pthread_key_delete() - create or delete a thread-specific data key SYNOPSIS
PARAMETERS
key This is either a pointer to the location where the new key value will to be returned (create function) or the thread-spe- cific data key to be deleted (delete function). destructor Function to be called to destroy a data value associated with key when the thread terminates. DESCRIPTION
creates a unique thread-specific data key. The key may be used by threads within the process to maintain thread-specific data. The same key is used by all threads, but each thread has its own thread-specific value associated with key. For each thread, the value associated with key persists for the life of the thread. By default, the system allows a process to create up to number of thread-specific data keys. If the process needs more keys, the environ- ment variable can set the number of keys up to a maximum of 16384. If a value outside the range of and 16384 is specified, or if the envi- ronment variable is not set at all, the default value is considered. When a new thread-specific data key is created, each thread will ini- tially have the value NULL associated with the new key. Each time a thread is created, the new thread will have the value NULL for each thread-specific data key that has been created in the process. A thread may use to change the value associated with a thread-specific data key. Note: is an opaque data type. When a thread terminates, it may have non-NULL values associated with some or all of its thread-specific data keys. Typically, these val- ues will be pointers to dynamically allocated memory. If this memory is not released when the thread terminates, memory leaks in the process occur. An optional function may be provided at key creation time to destroy the thread-specific data of a terminating thread. When a thread terminates, the thread-specific data values associated with the thread will be examined. For each key that has a non-NULL thread-specific data value and a destructor function, the destructor function will be called with the thread-specific data value as its sole argument. The order in which destructor functions are called is unspecified. Once all the destructor functions have been called, the thread-specific data values for the terminating thread are examined again. If there are still non-NULL values in which the associated keys have destructor functions, the process of calling destructor functions is repeated. If after iterations of this loop there are still some non-NULL values with associated destructors, the system may stop calling the destructors or continue calling the destructors until there are no non-NULL values. Note: This may result in an infinite loop. If a destructor function is not desired for key, the value NULL may be passed in the destructor parameter. The function deletes a thread-specific data key. The key must have been previously created by The thread-specific data values associated with key are not required to be NULL when this function is called. Using key after it has been deleted results in undefined behavior. If a destructor function is associated with key, it will not be invoked by the function. Once key has been deleted, any function that was associated with key is not called when a thread exits. It is the responsibility of the application to free any application storage for each of the threads using key. The function can be called from a destructor function. RETURN VALUE
If successful, and return zero. Otherwise, an error number is returned to indicate the error (the variable is not set). ERRORS
If any of the following occur, the function returns the corresponding error number: The value specified by key is invalid. The necessary resources to create another thread-specific data key are not available, or the total number of keys per process has exceeded or an invalid value was specified with the environment variable There is insufficient memory available in which to create key. For each of the following conditions, if the condition is detected, the function returns the corresponding error number: The value specified by key is invalid. AUTHOR
and were derived from the IEEE POSIX P1003.1c standard. SEE ALSO
pthread_getspecific(3T), pthread_setspecific(3T). STANDARDS CONFORMANCE
Pthread Library pthread_key_create(3T)
All times are GMT -4. The time now is 11:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy