12-18-2001
Pipe mailq to:
perl -ne 'if (/\((\d*?) requests/) { print $1."\n";}'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I just wanted to know if there is a way in UNIX to select a line value from a list of words. there is no line number before each word, hence could not use grep. (4 Replies)
Discussion started by: unibboy
4 Replies
2. Shell Programming and Scripting
hi,
im quite new to perl regexp. i have a problem where i want to extract a word from a given string. but the word is unknown, only fact is that it appears as the second word in the string.
Eg.
input string(s) :
char var1 = 'A';
int var2 = 10;
char *ptr;
and what i want to do is... (3 Replies)
Discussion started by: wolwy_pete
3 Replies
3. Shell Programming and Scripting
Dear friends, Please help me to resolve the problem below,
I have a file with following content:
date of file creation : 12 feb 2007
====================
= name : suresh
= city :mumbai
#this is a blank line
= date : 1st Nov 2005
====================
few lines of some text
this... (7 Replies)
Discussion started by: swamymns
7 Replies
4. Solaris
Hello,
I have a problem - I created a chrooted jail for one user. When I'm logged in as root, everything work fine, but when I'm logged in as a chrooted user - I have many problems:
1. When I execute the command ping, I get weird results:
bash-3.00$ usr/sbin/ping localhost ... (4 Replies)
Discussion started by: Przemek
4 Replies
5. Shell Programming and Scripting
i store the output of ls in a variable FL
$FL=`ls`
$echo $FL
f1.txt f2.txt f3.txt f4.txt f5.txt script.sh script.sh~ test.txt
now if i want to retrive the sub-string "f1.txt" from $FL we were taught that this is what i have to do
$set $FL
$echo $1
f1.txt
and echo $2 would give... (1 Reply)
Discussion started by: c_d
1 Replies
6. Shell Programming and Scripting
Hi,
I have a small question... Since i am new to Unix ksh scripting i am having this problem of understanding...
Well the thing is that i just want a part of a line for example
Data Set=ELIG_Member_20090126.dat Count Total= 8192 Actual Total= 8187
I just want the value of Actual Total... (4 Replies)
Discussion started by: bhagya2340
4 Replies
7. UNIX for Dummies Questions & Answers
I have a string:
hgLogOutput=" +0000 files: forum/web/hook-test.txt /forum/web/hook-test-2.txt description: test"
and I want to extract the file names from it, they will always appear between the files: and the description:. I have worked out that I can do this:
"$hgLogOutput" | awk '{... (2 Replies)
Discussion started by: klogger
2 Replies
8. Shell Programming and Scripting
Hi Team,
I am searching through log file using
grep -i '<search_key>' <file_name>|awk '{print $18}'
example outputs are
I would like to select the data between and no other as I am getting some junk characters sometimes which chaging the o/p display format.
Kindly assist.... (8 Replies)
Discussion started by: sanjaydubey2006
8 Replies
9. Shell Programming and Scripting
Hi,
Can anyone help me that, How to see the table fields in Oracle database through shell script(ksh).
I have tried with the following:
sqlplus -s $user/$passwd@$sid << SQL >> session.log
select * from Testtab.sql
I'm not able to see anything..
Thanks (4 Replies)
Discussion started by: zxcjggu708
4 Replies
10. Programming
I realize this general issue (inputting strings of variable length in C) has been addressed in myriad locations before, but I'm interested in knowing why my specific approach is not working. (BTW I'm intentionally keeping the size increments small so that I can more easily follow what's going on.... (5 Replies)
Discussion started by: DevuanFan
5 Replies
LEARN ABOUT DEBIAN
poe::pipe::twoway
POE::Pipe::TwoWay(3pm) User Contributed Perl Documentation POE::Pipe::TwoWay(3pm)
NAME
POE::Pipe::TwoWay - a portable API for two-way pipes
SYNOPSIS
my ($a_read, $a_write, $b_read, $b_write) = POE::Pipe::TwoWay->new();
die "couldn't create a pipe: $!" unless defined $a_read;
DESCRIPTION
Pipes are troublesome beasts because there are a few different, incompatible ways to create them, and many operating systems implement some
subset of them. Therefore it's impossible to rely on a particular method for their creation.
POE::Pipe::TwoWay will attempt to create a bidirectional pipe using an appropriate method. If that fails, it will fall back to some other
means until success or all methods have been exhausted. Some operating systems require certain exceptions, which are hardcoded into the
library.
The upshot of all this is that an application can use POE::Pipe::TwoWay to create a bidirectional pipe without worrying about the mechanism
that works in the current run-time environment.
By the way, POE::Pipe::TwoWay doesn't use POE internally, so it may be used in stand-alone applications without POE.
PUBLIC METHODS
new [TYPE]
Create a new two-way pipe, optionally constraining it to a particular TYPE of pipe. Two-way pipes have two ends, both of which can be read
from and written to. Therefore, a successful new() call will return four handles: read and write for one end, and read and write for the
other. On failure, new() sets $! to describe the error and returns nothing.
my ($a_read, $a_write, $b_read, $b_write) = POE::Pipe::TwoWay->new();
die $! unless defined $a_read;
TYPE may be one of "pipe", "socketpair", or "inet". When set, POE::Pipe::TwoWay will constrain its search to either "pipe()", a UNIX-
domain "socketpair()", or plain old sockets, respectively. Otherwise new() will try each method in order, or a particular method
predetermined to be the best one for the current operating environment.
BUGS
POE::Pipe::OneWay may block up to one second on some systems if failure occurs while trying to create "inet" sockets.
SEE ALSO
POE::Pipe, POE::Pipe::OneWay.
AUTHOR & COPYRIGHT
POE::Pipe::TwoWay is copyright 2000-2008 by Rocco Caputo. All rights reserved. POE::Pipe::TwoWay is free software; you may redistribute
it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-15 POE::Pipe::TwoWay(3pm)