09-12-2007
Quote:
Originally Posted by
royalibrahim
What is the need for "p" after myfifo? what is it meant for?
mknod is the unix command for creating special files. A pipe is a type of special file, and with the "p" option you tell mknod to create a FIFO (aka named pipe).
varungupta has explained the behaviour of normal command piping. In this case, the OS creates a temporary file for doing the work (a pipe), but you cannot reference explicitly this pipe by name, because is managed internally by the OS.
If you specifically need to put in communication two or more processes through NAMED pipes, you have to create a FIFO with mknod as explained before. In this manner you can reference explicitly the file on disk.
Generally, named pipes are used in the cases where a specific command line utility doesn't accept pipes as input, and you are forced to pass a phisical file to the utility as the input data. For these situations, named pipes are the answer.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I am having trouble with a script to export individual schemas to tape from an oracle database. Basicaly I need to export each shema through a pipe with compression and store each shema name in a file with the relevant tape marker. (4 Replies)
Discussion started by: truma1
4 Replies
2. Filesystems, Disks and Memory
Hello!
How I can increase or decrease predefined pipe buffer size?
System FreeBSD 4.9 and RedHat Linux 9.0
Thanks! (1 Reply)
Discussion started by: Jus
1 Replies
3. Shell Programming and Scripting
Hi...Can anyone please guide me on FIFO Pipes in UNIX.I have lerant things like creating fifo pipes,using them for reads and writes etc.I want to know what is the maximum amount of memory that such a pipe may have? Also can anyone guide me on where to get info on this topic from? (1 Reply)
Discussion started by: tej.buch
1 Replies
4. UNIX for Advanced & Expert Users
The following code does not work (zsh, Solaris), but works without the first line (files instead of pipes) :confused:
mkfifo p1 p2
echo "Hello" | tee p1 > p2 &
paste p1 p2
I would high appreciate any help to fix it. (9 Replies)
Discussion started by: zzol
9 Replies
5. HP-UX
Hi,
Please help me on this.
I am creating a named pipe in a kshell script.
I am using mkfifo pipe_name command to create the pipe.
I want to remove the named pipe after my work is completed.
How can i do that. (8 Replies)
Discussion started by: chintapalli001
8 Replies
6. UNIX for Dummies Questions & Answers
hi,
i am working on a script for oracle export, m using a parameter file...
i want to compress the dump file that is generated..
in my script following is the code i have written.
i am not able to generata .gz file
mknod /tmp/exp_tesd1_pipe p
gzip -cNf... (4 Replies)
Discussion started by: saharookiedba
4 Replies
7. Shell Programming and Scripting
Tried the following on Hpux 11.11, using both ksh, and dtksh
$diff <(sort file1) <(sort file2)
$ ksh: syntax error: `(' unexpected
Strange thing is I tried the same command under RHEL5 using ksh 93 and it works fine. Does anyone know if this is possible on HPUX without the use of... (0 Replies)
Discussion started by: fire!
0 Replies
8. UNIX for Advanced & Expert Users
I'm not sure whether or not this question really belongs in this forum and will accept rebuke should I have mistakenly put it in the wrong place (hopefully the rebuke will be accompanied by an answer, though)
I wish to implement named pipe communication between two process using MKS Toolkit. I... (2 Replies)
Discussion started by: ArndW
2 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a C program to search the current directory for all pipes.
1. It will print the pipe... (2 Replies)
Discussion started by: natwickley
2 Replies
10. Shell Programming and Scripting
Dear community,
I communicate with an external program (maxima) using named pipes. If I use a text file to capture the output (maxima > out.txt) i can see the programs answer directly after the input written into the file. But if bypass the output into a named pipe (maxima > pipe) and capture it... (1 Reply)
Discussion started by: Pustekuchen
1 Replies
LEARN ABOUT DEBIAN
pfsinmulti
pfsinmulti(1) General Commands Manual pfsinmulti(1)
NAME
pfsinmulti - read several streams of frames and write pfs streams to named pipes
SYNOPSIS
pfsinmulti pfsinmulti <file> [--frames f:s:t] [--skip-frames] [<file>...] -- command @1 @2 [@3 ...]
DESCRIPTION
Use this command to read several animation sequences and write them to pfsstreams. This command is useful with those pfs programs, which
take several pfs streams as arguments. For example, the following command can be used to combine two animations so that there are stitched
together:
pfsinmulti anim_a-%04d.hdr anim_b-%04d.hdr -- pfscat @1 @2
arguments @1 and @2 are replaced with named pipes for anim_a-%04d.hdr and anim_b-%04d.hdr frames respectively. command argument is obliga-
tory and it must be preceded with '--'. There should be as many @1, @2, .., @n arguments as there are animation sequences given as input.
Arguments --frames, --skip-frames and other options are handled the same way as in pfsin program. Also pfsinmulti recognizes the same file
formats as pfsin.
Technically, pfsinmulti creates a named pipe for each pfsstream, replaces @n arguments with the names of those pipes and deletes the pipes
when command finishes.
EXAMPLES
pfsinmulti image1.hdr image2.hdr -- cat @1 @2 | pfsview
Does the same as 'pfsv image1.hdr image2.hdr' but in much more sophisticated way.
SEE ALSO
pfsin(1)
BUGS
This command currently does not handle multiple frames given with a %d pattern in case of LDR formats: JPEG, PNG, PNM.
Please report bugs and comments to Rafal Mantiuk <mantiuk@mpi-sb.mpg.de>.
pfsinmulti(1)