"why output consists of 3 values"

Post #302681871 by FUTURE_EINSTEIN on Saturday 4th of August 2012 05:41:04 PM

why output consists of 3 values

Hi there if I have a file called an411
which contains the folowing information
152.78.74.111 [13/Feb/2011:06:52:00 +0000] "GET /datafeed.php HTTP/1.1" 200 2826
152.78.74.211 [13/Feb/2011:06:53:00 +0000] "GET /index.html HTTP/1.1" 200 1190
152.78.74.121 [13/Feb/2011:06:55:00 +0000] "GET / HTTP/1.1" 200 3000
and I want to ouput the number of bytes of the record that contains pattern.
The code:
Code:
 grep '[datafeed.php]' an411 | cut -d" " -f8

returns
2826
1190
3000
Can anyone explain me why it returns 3 values. I think it should return only one because grep matches pattern doesn't it?
Any help Smilie
Thanks in advance Smilie
 
Test Your Knowledge in Computers #604
Difficulty: Medium
In MySQL 8.0 table encryption can be managed globally by defining and enforcing encryption defaults
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

assign values from awk output - help

Dear All, I have a command which gives the number of fields of each line of a comma-separated file. sthng like this : cat QDB_20071126_002.bad | awk -F"," '{ print NF }' I need to assign the first output and the last output of the above command to variables in a script. Need help to do... (4 Replies)
Discussion started by: KrishnaSaran
4 Replies

2. AIX

fr and sr (from vmstat output) values are very high

Hi AIX Expert, the fr (page freed/page replacement) and sr (pages scanned by page-replacement algorithm) values from the vmstat output (see below please) are very high. I usually see this high value during the oracle database backup. In addition, the page scan/page steal/ page faults values... (7 Replies)
Discussion started by: Beginer0705
7 Replies

3. Shell Programming and Scripting

Store the output values in array

Hi, How to store the values in array from output result, EG: I have the result like this, ps, google, 1.txt, 1 sam, google, 2.txt, 2 These are the four values followed by comma in two sets. I need to store these values set by set. One set contains four values followed by comma. ... (2 Replies)
Discussion started by: KarthikPS
2 Replies

4. Shell Programming and Scripting

Output breaking when returning multiple values

I've been trying to write a command-line function to grab a website's MX records and their ip addresses. The code below works with domains that only have one MX record: function kmx { mx=`host -t MX $1 | awk '{ print $7 }'`; ip=`host $mx | sed '/IPv6/d;/handled/d' | awk '{ print $4 }'`; ... (8 Replies)
Discussion started by: Azrael
8 Replies

5. Shell Programming and Scripting

Is it possible to extract these values from the output

Hi, I would like to search based of "java" and "-Dplatform.home=" and store these two values in bash variables. ps -xef | grep <pid> wlsuser 15160 15144 0 Feb 20 ? 17:27 /app1/jdk150_07/bin/IA64N/java -server -Xms1536m -Dplatform.home=/app1/bea/weblogic92... (13 Replies)
Discussion started by: mohtashims
13 Replies

6. Shell Programming and Scripting

Extract multiple values from a tnsping output

Hi all, Can anyone help with the following request? I need to extract HOST value, SERVICE_NAME and msec value from a tnsping output and append to a file. The tnsping output is typically as follows: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS =... (4 Replies)
Discussion started by: jonnyd
4 Replies

7. UNIX for Dummies Questions & Answers

Different values output between du and df

Dear Gurus I have a doubt: Why df -h command shows me that /opt FS has used 3.0G: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 9.7G 5.8G 3.5G 63% / /dev/mapper/VolGroup00-LogVol05 226G 171G... (4 Replies)
Discussion started by: orma
4 Replies

8. UNIX for Dummies Questions & Answers

Maximum of the values from the output a query

Following is the output of a command ran inside the script: 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5... (8 Replies)
Discussion started by: Devendra Hupri
8 Replies

9. Solaris

Asvc_t values in iostat output

Noticed that asvc_t values in iostat command outputs are mostly more than 100 in our previous iostat analysis. Also found the following detail from an alternate site IO Bottleneck - Disk performance issue - UnixArena ---- 1. asvc_t average service time of active transactions, in... (2 Replies)
Discussion started by: saraperu
2 Replies

10. Shell Programming and Scripting

Find values within range and output

Dear All, I am stacked and I ask for your help. Briefly, I have two files, one like this one (file1): 1 101 5 1 102 6 1 103 2 1 104 9 1 105 10 2 301 89 2 302 4 2 303 13 2 304 34 2 305 1 and the other like this one (file2): 1 103 2 303well, what I am trying to do is obtain a... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
WNINTRO(7WN)						  Miscellaneous WordNettm Topics					      WNINTRO(7WN)

NAME
wnintro - introduction to miscellaneous WordNet information SYNOPSIS
morphy - discussion of WordNet's morphological processing uniqbeg - unique beginners for noun hierarchies wngloss - glossary of terms used in WordNet wngroups - discussion of WordNet search code to group similar senses wnlicens - text of WordNet license agreement wnpkgs - information about WordNet packages and distribution wnstats - database statistics DESCRIPTION
This section of the WordNet Reference Manual contains manual pages that describe various topics related to WordNet and the semantic concor- dances, and a glossary of terms. SEE ALSO
wnintro(1WN), wnintro(3WN), wnintro(5WN), morphy(7WN), uniqbeg(7WN), wngroups(7WN), wnlicens(7WN), wnpkgs(7WN), wnstats(7WN), wngloss(7WN). Fellbaum, C.(1998), ed. "WordNet: An Electronic Lexical Database". MIT Press, Cambridge, MA. WordNet 3.0 Dec 2006 WNINTRO(7WN)

Featured Tech Videos

All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy