Hi,
i have a function which return a variable .
serach ( paramatere) when i excute this function i get the result in the shell,
i want to print this result in a file by calling just the function.
how can i do it..
the code example is like that:
search ( )
{
..
}
the call... (0 Replies)
i got a data file which contains all the pid,ppid,user,command,pcpu,start_time,status. I wanted to display out the pcpu which is greater than 0.
i uses awk'{if($5 > 0){print}}' filename.txt but is printing out result which not i wanted. Is there any way which i can print out those pcpu which is... (8 Replies)
I'm still beginner and maybe someone can help me.
I have this input:
the great warrior a, b, c
and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this :
Warrior Type
a
b
c
Im still very... (3 Replies)
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Hello....
Pls help me (and sorry my english) :)
So
I have a file (test.txt) with 1 long line.... for example:
isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh
How to print after the "error" word the 2nd 4th 5th and 7th word??
output well be:
653 isfbisfb... (2 Replies)
I have a result like this
root@server # grep -rl maldet /etc/cron*
/etc/cron.d/maldet_daily
/etc/cron.d/malcron
/etc/cron.d/malcrondaily
/etc/cron.d/malcronweekly
What I need is, I need an if/else condition such that, if there is any output other than /etc/cron.d/maldet_daily in the... (8 Replies)
I am trying to move files which donot have same filename using
find /Users/ParijatMac/desktop/unix/new_dir -type f -mmin +"$HRS" -exec mv -n "{}" /Users/ParijatMac/desktop/unix/old_dir \; -print
but i am getting all filenames including the ones with duplicate names.Please help me to sort... (5 Replies)
Discussion started by: parijat guh
5 Replies
LEARN ABOUT DEBIAN
lire::test::commandresult
CommandResult(3pm) LogReport's Lire Documentation CommandResult(3pm)NAME
Lire::Test::CommandResult - Object used to report the results of shell commands
SYNOPSIS
use Lire::Test::FunctionalTestCase;
my $result = $self->lire_run( "echo Test" );
print $result->status();
print $result->stdout();
print $result->stderr();
print scalar $result->sent_mail(), " emails were sent.
";
DESCRIPTION
Lire::Test::ComandResult objects are used to report the results of shell commands run through Lire::Test::FunctionalTestCase::lire_run().
command()
Returns the shell command that was run. This is the complete command line which was interpreated by the shell.
status()
Returns the command result status. (What is usually contained in $?).
stdout()
Returns what was output on stdout while executing the command.
stderr()
Returns what was output on stderr while executing the command.
sent_mail()
Returns in an array reference the message that were sent out during this command run. The element of this array are hash reference
containing two keys:
recipients
An array reference containing the recipients as passed on the command line to sendmail.
message
The email which was sent. This is the complete text of the email. This is what was passed to sendmail via STDIN.
SEE ALSO Lire::Test::FunctionaLTestCase(3pm)VERSION
$Id: CommandResult.pm,v 1.6 2006/07/23 13:16:31 vanbaal Exp $
AUTHOR
Francis J. Lacoste <flacoste@logreport.org>
COPYRIGHT
Copyright (C) 2003 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
Lire 2.1.1 2006-07-23 CommandResult(3pm)