Here is a bash (or ksh) script that will do what you want entirely in shell and using awk:
The first line in this script uses the 1st argument to your script as the value to match, but defaults to "2222" if the 1st argument is missing or is an empty string.
This User Gave Thanks to Don Cragun For This Post:
Dear All,
I need a unix script that will read the 7th line and especially these fileds from a file Mo speed 16, Mt speed 15 every 15 minutes starting from 00:00 to 23:45 on daily basis and put the result in a txt file and name it MT_MO_20090225.txt, please also note that the system date format... (2 Replies)
Hi All,
I have the same problem as the one posted in
https://www.unix.com/shell-programming-scripting/96097-how-read-value-specific-line-column-csh-variable.html
but I'm using bash.
Can anyone tell me how I have to modify the code to make it bash compatible?
eval `awk 'NR==3{print "set... (5 Replies)
Hi,
Im trying to write this script but im stuck on it, basicaly what i want to do is to write a code to verify a log file ( apache log file for example ) and for each new line with specific data , then, output this new line for another file:
full ex:
output of the server.log is (... (4 Replies)
My project is to get a temperature reading from a refridgerator every 2 minutes and check to see if the door has been left open.
I don't yet have the mastery of Linux, being a complete noob, but I reckon I need a text file with the latest temperature reading in it. This I've managed to do by... (2 Replies)
I use zentyal for my server admin, which is great but zentyal auto-generates config file on boot and hence overwrites any changes made directly to config files. In order to allow multiple user access to a MS ACCESS database, I need to customise the smb.conf file and add the following line to the... (9 Replies)
I'm working on a personal project, a multiplication quiz script for my kids. In it, the user's performance will be recorded and written to a file. After they've played it a little while, it will start to focus more on the ones that give them the most trouble-- that take a long time to answer or... (4 Replies)
I need some help. I would like to read in a text file.
Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01.
Is this possible? any help is appreciated. (2 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Hi All,
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies
LEARN ABOUT HPUX
powd32
powd64(3M)powd64(3M)NAME
powd64(), powd128(), powd32() - decimal power functions
SYNOPSIS DESCRIPTION
The function returns
is a version of it takes arguments and returns a result.
is a version of it takes arguments and returns a result.
These math functions are supported for HP-UX 11i Version 3 September 2008 Update and forward.
USAGE
To use any of these functions, compile with the option.
Make sure your program defines and then includes
Link in the math library by specifying or on the linking command line.
For more information, see the at the following site:
RETURN VALUE
and raises the divide-by-zero floating-point exception for y an odd integer < 0.
returns +infinity and raises the divide-by-zero floating-point exception for y<0 and not an odd integer.
for y an odd integer > 0.
returns +0 for y>0 and not an odd integer.
returns 1.
returns 1 for any x, even NaN.
returns 1 for any x, even NaN.
returns NaN and raises the invalid floating-point exception for finite x<0 and finite non-integer y.
returns +infinity for |x|<1.
returns +0 for |x|>1.
returns +0 for |x|<1.
returns +infinity for |x|>1.
returns -0 for y an odd integer < 0.
returns +0 for y<0 and not an odd integer.
returns -infinity for y an odd integer > 0.
returns +infinity for y>0 and not an odd integer.
returns +0 for y<0.
returns +inf for y>0.
Otherwise, if either argument is NaN, then returns NaN.
returns the properly signed infinity (or, in some non-default rounding direction modes, the properly signed maximum-magnitude finite num-
ber) in lieu of a value whose magnitude is too large, and raises the overflow and inexact exceptions.
raises the underflow exception whenever a result is tiny (essentially subnormal or zero) and inexact.
raises the inexact exception whenever a rounded result does not equal the mathematical result.
ERRORS
For finite x<0 and finite non-integer y, sets to
sets to if y is an odd integer < 0.
sets to if y<0 and not an odd integer.
If the correct value would overflow, sets to
SEE ALSO cbrtd64(3M), expd64(3M), logd64(3M), scalblnd64(3M), scalbnd64(3M), sqrtd64(3M), math(5).
STANDARDS CONFORMANCE
These functions conform to ISO/IEC TR 24732, "Extension for the programming language C to support decimal floating-point arithmetic".
HP Integrity Server Only powd64(3M)