Search Results

Search: Posts Made By: he204035
1,716
Posted By he204035
I figured it out! awk '/packet loss/ && !/,...
I figured it out!

awk '/packet loss/ && !/, 0% packet loss/{if (a && a !~ /packet loss/) print a; print} {a=$0}' log_ping.txt

prints

---- 10.199.1.4 ping statistics ----
3 packets sent, 3...
1,716
Posted By he204035
That gives me 0 output. I wonder if I try...
That gives me 0 output.

I wonder if I try something that matches on "packet loss" but doesn't match on "3
responses received"?
1,716
Posted By he204035
awk Pattern Matching for PING tests
I have a script that logs into a server and pings several other servers in order to verify IP path between servers.

The output can look like this, if good pings:
Response from 1.1.1.4;_id=0,...
947
Posted By he204035
Thank you!!! That was driving me BANANAS!!...
Thank you!!!

That was driving me BANANAS!!

I like having the K/M/G displayed. Makes it pretty tidy.

Thanks again!
947
Posted By he204035
Trying to Parse An Inherited Command/Routine
I am am one of these people that it isn't good enough just to say, "Here, try this...". it is important for me to understand how and why something works (or doesn't work.)

All that being said, I...
1,760
Posted By he204035
I cannot upload a sample text file because it has...
I cannot upload a sample text file because it has customer proprietary infomation. Each line has 115 fields ($1 - $115) but fields $5 and $11 would look like so:
4012 1070397
4012 1070397
4014...
1,760
Posted By he204035
Nawk One Liner to Count Field Combinations
I have text files, fields separated by commas, and there are 115 fields.
I need to use nawk to look at each line, if field $4==10, then count how many times the combination of field $5 and field $11...
1,495
Posted By he204035
Counting Multiple Fields with awk/nawk
I am trying to figure out a way in nawk to 1) get a count of the number of times a value appears in field 1 and 2) count each time the same value appears in field 2 for each value of field 1. So for...
1,847
Posted By he204035
That worked, balajesuri. Thanks so much!
That worked, balajesuri.

Thanks so much!
1,847
Posted By he204035
File that Contains a List of Files
I have a first text file (LoopFiles.txt) that contains another list of text files. I need to run NAWK commands on each of the files that are listed in the first text file.

I have proven the...
8,430
Posted By he204035
I have 2 lines that each start with "nawk". ...
I have 2 lines that each start with "nawk". Agreed, each of those lines also have "awk" piped in the line, but I am referring to the the 2nd line that starts out with "nawk".
8,430
Posted By he204035
The first part of the script works good. It does...
The first part of the script works good. It does indeed calculate the date for yesterday, and pulls the items I need.

I only have the problem on the second nawk command. Even when i just try to...
8,430
Posted By he204035
Date with Wildcards in Command
I have the following script (parts from help on this forum, thanks y'all):
#!/usr/bin/ksh

date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
...
1,869
Posted By he204035
Yeah, I realize that simply doing a minus 1 on a...
Yeah, I realize that simply doing a minus 1 on a date wont always work, but I am glad that I figured out the formatting section, etc and got it to populate into my nawk command. Now I can wax-on,...
1,869
Posted By he204035
I figured it out! This works! date...
I figured it out!

This works!

date +%Y%m%d | awk '{printf"%8d\n",($1-1)}'
Thanks for your help.
1,869
Posted By he204035
Thank you!! Happy Holidays! ---------- Post...
Thank you!! Happy Holidays!

---------- Post updated at 01:25 PM ---------- Previous update was at 12:14 PM ----------

Ok, so another question...this command works getting yesterday's date...
1,869
Posted By he204035
For Args and Nawk
I am trying to write a simple shell script that will take certain arguments (numerical values) and plug each one into a nawk command.

I thought I would need to use for args x y z but i get...
1,217
Posted By he204035
Extremely New to Shell Scripts
I am sorry if this qeustion is silly. (Please see Title of this thread.)

Is it possible to build a shell script that 1) runs a nawk command that I know works, to analyze a column of data and 2)...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy