8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
gawk 'BEGIN{count=0} /^Jan 5 04:33/,0 && /fail/ && /09x83377/ { count++ } END { print count }' /var/log/syslog
what is wrong with this code? i want to search the strings "fail" and "09x83377" from all entries. im grabbing all entries in the log starting from Jan 5 04:33 to the end of the... (3 Replies)
Discussion started by: SkySmart
3 Replies
2. Shell Programming and Scripting
Experts,
In one example I have seen how to get output upto 3rd octet, when there is a ":" separated with the 4rth octet.
However in this example how to remove 4rth octet and to keep upto 3rd octet with regular expressions and awk sub function:
I have tried with :but not working:
# awk '{... (3 Replies)
Discussion started by: rveri
3 Replies
3. Shell Programming and Scripting
how do i "awk" the date after the from only to compare it on a if statement later .
filename example:
server1-ips-ultranoob-ok_From_2012_21_12-23:40:23_To_2012_21_12-23:49:45.zip
what i want o do is compare only the date from the string in "From_2012_21_12" in this case i only want the... (4 Replies)
Discussion started by: drd0spt
4 Replies
4. Shell Programming and Scripting
bash-2.05$ A=`cat /etc/group |awk -F':' '{if ($1$3$4 ==... (3 Replies)
Discussion started by: ak835
3 Replies
5. UNIX for Dummies Questions & Answers
Ok, this may be very simple but I can't find a solution. I have a list of numbered values which I have grepped from a larger life.
ex/
1:7.54
2:4.52
3:3.22
4:2.11
5:3.59
6:4.36
7:6.88
8:12.28
9:13.37
10:15.6
11:17.66
12:14.25
I need a quick way to organize them (using awk?)... (4 Replies)
Discussion started by: jdolny
4 Replies
6. UNIX and Linux Applications
Hi All,
I found my weblog contain entries like 121.23.3 Instead of four octet.
I am quite confused is it possible to have 3 octet ip at all ??
Is it generating by any program and hittng the website ?
Is it a subdomain ?
Please tell me your understanding on it ?
Thanks (4 Replies)
Discussion started by: jambesh
4 Replies
7. Shell Programming and Scripting
Ok. I'm just starting to use AWK and I have a question. Here's what I'm trying to do:
uname -n returns the following on my box:
ftsdt-svsi20.si.sandbox.com
I want to pipe this to an AWK statement and make it only print:
svsi20
I tried:
uname -n | awk '{ FS = "." ; print $1 }'
... (5 Replies)
Discussion started by: Probos
5 Replies
8. Shell Programming and Scripting
Whats up fellas... hope someone can help me with the following...
I am parsing an file that is space delimited, however, in the middle, there is an ugly "Account Name" feild that in itself has multiple varying spaces, and commas which throws off my script.
The 1st 3 feilds I am able to obtain... (8 Replies)
Discussion started by: djsal
8 Replies