could any one tell me why the following code is working in infinite loop
every time it is asking for no. even though it does not have for loop
#!/bin/awk -f
BEGIN {
print "type a number";
}
{
print "The square of ", $1, " is ", $1*$1;
print "type another number";
}
END {
... (3 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)
hi guys,
i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB
MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
this the file raw format:
Number of... (6 Replies)
I have a file with the following content.
> cat /tmp/internetusage.txt
6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file.
awk '{ print $1/$2*100 }' /tmp/internetusage.txt
This outputs the value "22.3643" as a... (1 Reply)
hi i want to find the size of a folder and assign it to a variable and then compare if it is greater than 1 gb.
i am doin this script, but it is throwing error....
#!/bin/ksh
cd . | du -s | size = awk '{print $1}'
if size >= 112000
then
echo size high
fi
ERROR : (4 Replies)
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Hi Experts,
I am trying to get system output to capture inside awk , but not working:
Please advise if this is possible :
I am trying something like this but not working, the output is coming wrong:
echo "" | awk '{d=system ("date") ; print "Current date is:" , d }'
Thanks, (5 Replies)
Good evening, Im newbie at unix specially with awk
From an scheduler program called Autosys i want to extract some data reading an inputfile that comprises jobs names, then formating the output to columns for example
1.
This is the inputfile:
$ more MapaRep.txt
ds_extra_nikira_usuarios... (18 Replies)
Discussion started by: alexcol
18 Replies
LEARN ABOUT REDHAT
perlivp
PERLIVP(1) Perl Programmers Reference Guide PERLIVP(1)NAME
perlivp - Perl Installation Verification Procedure
SYNOPSIS
perlivp [-p] [-v] [-h]
DESCRIPTION
The perlivp program is set up at Perl source code build time to test the Perl version it was built under. It can be used after running:
make install
(or your platform's equivalent procedure) to verify that perl and its libraries have been installed correctly. A correct installation is
verified by output that looks like:
ok 1
ok 2
etc.
OPTIONS -h help
Prints out a brief help message.
-p print preface
Gives a description of each test prior to performing it.
-v verbose
Gives more detailed information about each test, after it has been performed. Note that any failed tests ought to print out some
extra information whether or not -v is thrown.
DIAGNOSTICS
o print "# Perl binary `$perlpath' does not appear executable.
";
Likely to occur for a perl binary that was not properly installed. Correct by conducting a proper installation.
o print "# Perl version `$]' installed, expected $ivp_VERSION.
";
Likely to occur for a perl that was not properly installed. Correct by conducting a proper installation.
o print "# Perl @INC directory `$_' does not appear to exist.
";
Likely to occur for a perl library tree that was not properly installed. Correct by conducting a proper installation.
o print "# Needed module `$_' does not appear to be properly installed.
";
One of the two modules that is used by perlivp was not present in the installation. This is a serious error since it adversely affects
perlivp's ability to function. You may be able to correct this by performing a proper perl installation.
o print "# Required module `$_' does not appear to be properly installed.
";
An attempt to "eval "require $module"" failed, even though the list of extensions indicated that it should succeed. Correct by con-
ducting a proper installation.
o print "# Unnecessary module `bLuRfle' appears to be installed.
";
This test not coming out ok could indicate that you have in fact installed a bLuRfle.pm module or that the "eval " require "$mod-
ule_name.pm"; "" test may give misleading results with your installation of perl. If yours is the latter case then please let the
author know.
o print "# file",+($#missing == 0) ? '' : 's'," missing from installation:
";
One or more files turned up missing according to a run of "ExtUtils::Installed -> validate()" over your installation. Correct by con-
ducting a proper installation.
o print "# Perl header `$_' does not appear to be properly installed.
";
Correct by running h2ph over your system's C header files. If necessary, edit the resulting *.ph files to eliminate perl syntax
errors.
For further information on how to conduct a proper installation consult the INSTALL file that comes with the perl source and the README
file for your platform.
AUTHOR
Peter Prymmer
perl v5.8.0 2003-02-18 PERLIVP(1)