so what I'm basically asking is, if a builtin command occurs in the middle of a pipe sequence, is it executed in the parent shell process or as a subprocess?
In case it is executed in parent process, then we have the tedious task of closing the appropriate FDs before executing the next command, as the code never reaches ,
say case 0 : of your eg. statement.
the code for that would look like so:
In case we execute the external version directly, then we needn't worry about closing the pipe ends correctly, as the builtin would be exec'ed like a normal external command.
Hi,
Can the cd command be invoked using pipes???
My actual question is slightly different. I am trying to run an executable from different folders and the path of these folders are obtained dynamically from the front end. Is there a way in which i can actually run the executable... (2 Replies)
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? (4 Replies)
This is something I've given a lot of thought to and come up with no answer.
Say you have a data stream passing from a file, through process A, into process B. Process A only modifies a few bytes of the stream, then prints the rest of the stream unmodified. Is there any way to stream the file... (4 Replies)
im trying to figure out how to do the following:
using pipes to combine grep and find commands to print all lines in files that start with the letter f in the current directory that contain the word "test" for example?
again using pipes to combine grep and find command, how can I print all... (1 Reply)
I am really new to UNIX and programming in general and so apologies if this thread is a bit simple.
I have searched and found a piece of sample code for a training program I am currently undertaking, but seeing as I am relatively new, I dont completely understand how it works.
Here is the... (1 Reply)
I am really new to UNIX and programming in general and so apologies if this thread is a bit simple.
I have searched and found a piece of sample code for a training program I am currently undertaking, but seeing as I am relatively new, I dont completely understand how it works.
Here is the... (6 Replies)
Hello all, I am trying to learn more about programming Unix pipes in C.
I have created a pipe that does od -bc < myfile | head
Now, I am trying to create od -bc < myfile | head | wc
Here is my code, and I know I might be off, thats why I am here so I can get some clarification.
#include... (1 Reply)
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:
Create a pipe to show the number of people who are logged into the system right now.
Create a pipe to show... (2 Replies)
Discussion started by: lakers34kb
2 Replies
LEARN ABOUT DEBIAN
mail::message::construct::text
Mail::Message::Construct::Text(3pm) User Contributed Perl Documentation Mail::Message::Construct::Text(3pm)NAME
Mail::Message::Construct::Text - capture a Mail::Message as text
SYNOPSIS
my $text = $msg->string;
my $text = "$msg"; # via overload
my @text = $msg->lines;
my @text = @$lines; # via overload
my $fh = $msg->file;
my $line = <$fh>;
$msg->printStructure;
DESCRIPTION
Complex functionality on Mail::Message objects is implemented in different files which are autoloaded. This file implements the
functionality related to creating message replies.
METHODS
The whole message as text
$obj->file()
Returns the message as file-handle.
$obj->lines()
Returns the whole message as set of lines. In LIST context, copies of the lines are returned. In SCALAR context, a reference to an
array of lines is returned.
$obj->printStructure([FILEHANDLE|undef],[INDENT])
Print the structure of a message to the specified FILEHANDLE or the selected filehandle. When explicitly "undef" is specified as
handle, then the output will be returned as string.
The message's subject and the types of all composing parts are displayed.
INDENT specifies the initial indentation string: it is added in front of each line. The INDENT must contain at least one white-space.
example:
my $msg = ...;
$msg->printStructure(*OUTPUT);
$msg->printStructure;
my $struct = $msg->printStructure(undef);
# Possible output for one message:
multipart/mixed: forwarded message from Pietje Puk (1550 bytes)
text/plain (164 bytes)
message/rfc822 (1043 bytes)
multipart/alternative: A multipart alternative (942 bytes)
text/plain (148 bytes, deleted)
text/html (358 bytes)
$obj->string()
Returns the whole message as string.
Flags
SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/
LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2012-05-07 Mail::Message::Construct::Text(3pm)