The code you posted is giving me a syntax error on the first result="NONE". I tried to fix it but I cant make it work so I went in a different direction.
Breaking it down to smaller parts so its easier for me to understand.
Is giving me all the servers names.
Is giving me all servers and a count of processes with state running and suspended regardless on what server it runs. I cannot use S1="Process" to identify the processes because the actual names are random (not starting whit process).
Im trying to make the output of the script so that the state of processes are counted for each server.
Hi All,
I am trying to check if if column 5 is greater than 90. If greater it will print the term in column 6, else if all are within limit, then it will output "Size is within limit". I can't seem to do that with the below code. The output should only be 1 statement of "Size is within the... (4 Replies)
hi all,
i have a problem with my nawk command output below is the description :
nawk $12 == "00008001" { cnt++;cs_cd } END {for(cd in cs_cd) print cd, cs_cd } 2007020814.TDR
output :
133
123
desire output:
133,123,....
please advices
thank you so much (6 Replies)
Guys,
I have a script which hits the database and pulls the information that I need into files. Now I want to format these files to make them easy to read.
The sample format of the file will be like....
<Start_of_File>
Header1 .....xsdfsfa...adfa......
Header2 ....afefas .aefaefsdf...... (8 Replies)
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
awk experts,
I have in put file with time stamp followed by "," separated data. same patern continues. The output need time stamp in first columns and data total in 2nd columns.
Input file
T 9:15
d0,1,3,3
d1,2,1,1
d2,3,1,5
e1,1,1,1
T 9:30
d0,1,1,1
d1,2,3,2
d3,1,2,1... (10 Replies)
hi
i have a awk command with several querys....
awk 'FS="|""; print $4, $5, $6...etc....
$4 gives me the date 20120304
$5 is timestamp 101023
I want to format these in
2012.03.04 or 2012/03/04
10:10:23
but have no idea, if this is possible with format-parameters in the awk... (2 Replies)
Hello all , need help with this ...
Input File
DEV % POOL
0CB4 FBA 2211300 81792 4 IE RAID-5(3+1) R5_EFD100_1
- - 1805376 82 IF RAID-1 M2_FC300_1
- ... (4 Replies)
I've been diving into awk but still learning how to use it for text formatting. Below you can see my results are separated by a comma. Can somebody show me how to separate by TAB as well? An explanation would be appreciated as I did not comprehend the answer in the man pages and would like to gain... (1 Reply)
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
LEARN ABOUT MOJAVE
test::script
Test::Script(3) User Contributed Perl Documentation Test::Script(3)NAME
Test::Script - Basic cross-platform tests for scripts
DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or
bin as is also commonly used) paths of your Perl distribution.
Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible.
That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is
considered unacceptable.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking
that your module won't on some platform because of the dependency.
Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform
safety.
FUNCTIONS
script_compiles
script_compiles( 'script/foo.pl', 'Main script compiles' );
The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl).
This will also be shown in the diagnostic output on failure.
script_runs
script_runs( 'script/foo.pl', 'Main script runs' );
The "script_runs" test executes the script with "perl script.pl" and checks that it returns success.
The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the
local name used will be shown in the diagnostic output.
The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also
be shown in the diagnostic output on failure.
SUPPORT
All bugs should be filed via the bug tracker at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script>
For other issues, or commercial enhancement and support, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
prove, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.18.2 2009-11-23 Test::Script(3)