rdrtx1's proposal works well on the sample data line posted, but it assumes that the second number is always greater than the first, so that if N2 is less than the high boundary, so is N1, and if N1 is greater than the low boundary, so is N2, and thus omits two boundary tests.
If that assumption is not valid, and nothing has been said it is, then use
I need to grep out usernames with UID's greater than 200 out of the /etc/passwd file for a server migration. It is the third field however I am not sure to to accomplish this. I tried to search the forums but did not seem to find an answer (might have over looked it). Any help would be... (2 Replies)
Sorry for such a basic question, but I have spent hours trying to work this out! I need an awk command (or similar) that will look at a text file and output to the screen if the 4th column of each line has a value greater than or equal to x.
data.txt
This is the 1 line
This is the 2 line
This... (6 Replies)
Anyone have any advice?
I've tried just about every option, tweak, re-phrase in the man page, FAQ, and such, but there doesn't seem to be any information about what to do when your AfterImage-enabled RXVT displays its background image (xbm format converted from PNG by ImageMagick v6.-something)... (0 Replies)
Hello all
Hoping someone would be kind enough to suggest a solution to a problem i have, and see if maybe i can even do this without a script.
Essentially i have a very large log file, and within it each line had a value called TTMT, and it records a variable number in the following way, so... (6 Replies)
I am having an issue where I am do an SSH to about 30 servers one at a time however my script is getting hung up sometimes on the SSH.
I thought the & at the end as seen below would fire it and move on but that does not seem to be working.
#!/bin/sh
for remsys in trumpetsnail angel... (15 Replies)
I got some problem at startup before login such screen splashing, startup blocking on "checking battery status" and screen going black.
Now, that I've solved the above problems I see the desktop screen is upside-down n reversed as well. I tried re-installing nvidia-current, re-installing... (1 Reply)
data.txt
August 09 17:16 2013
August 09 17:17 2013
August 09 17:19 2013
August 09 17:20 2013
August 09 17:21 2013
August 09 17:22 2013
August 09 17:23 2013
August 09 17:24 2013
to print from a point in this file, to the end of the file, i type:
awk '/August 09 17:22/,0' data.txt.
... (1 Reply)
Hi,
For example, I would like to insert a pipe every 4 characters for each second field (including after the last block).
input (coma separated):
line1,AAAABBBBCCCCDDDDEEEE
line2,FFFFGGGGHHHHIIIIJJJJ
output:
line1,AAAA|BBBB|CCCC|DDDD|EEEE|
line2,FFFF|GGGG|HHHH|IIII|JJJJ|
my... (2 Replies)
looks like awk gets confused when there's a % next to a number.
command im running:
awk -F" " '/phxnaz001b/ && /vol/ && NF { if (($NF >= 80) && ($NF < 83)) { print ; print ; w++ } else if ($NF >= 83) { print ; c++ } } END { printf("%d:OK %d:WARNING %d:CRITICAL\n", o, w, c) }' /tmp/test.log
... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT HPUX
memalign
memalign(3C)memalign(3C)NAME
memalign() - allocate aligned memory
SYNOPSIS DESCRIPTION
allocates space for a block of size bytes, whose address is a multiple of boundary. The space is not initialized. The boundary must be a
power of 2.
EXTERNAL INFLUENCES
employs the allocator. For tuning information, see the malloc(3C) man page.
RETURN VALUE
Upon successful completion, returns a pointer to space aligned to a multiple of boundary. Otherwise, it returns a NULL pointer.
DIAGNOSTICS
returns a NULL pointer if there is no available memory, or if the value of boundary is not a power of 2.
ERRORS
sets to and returns a NULL pointer when an out-of-memory condition arises.
sets to and returns a NULL pointer when the value of boundary is not a power of 2.
sets to and returns a NULL pointer when the memory being managed by has been detectably corrupted.
WARNINGS
For warnings, see the malloc(3C) man page.
SEE ALSO thread_safety(5).
STANDARDS CONFORMANCE
There appear to be no standards applicable to Some implementations do not check that boundary is a power of 2. The HP-UX implementation is
not derived from any predecessor.
memalign(3C)