Sponsored Content
Full Discussion: fgrep to file plus some
Top Forums Shell Programming and Scripting fgrep to file plus some Post 302291403 by ski on Wednesday 25th of February 2009 02:28:57 PM
Old 02-25-2009
fgrep"${getdate}"${PROCESSOR${LOGINID}/Sum_SCR_Records.${YEAR}.log
> ${results} 2>/dev/null
The above outputs multiple entries for the date desired (same client can have mulitple entries). There are 3 logs for each client. The idea is to consolidate and recap to a report.
The problem is there is no identification to the client so I would like to add the login id.
Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need help with fgrep or grep

How can I do an and condition with fgrep. I want to do: ps -ef | fgrep -f searchvalues > tempmail.file mailx -s "Email Subject" email@domain.com < tempmail.file The search values file contains: opt/bea.*java.*80 mysqld What I want is to find things that contain: mysqld OR... (7 Replies)
Discussion started by: jimmy
7 Replies

2. UNIX for Advanced & Expert Users

fgrep

Hi Guys, Can anyone explain why I'm getting error below? when I execute in other server there is no error, what could be the reason. $ fgrep -f timecell.txt ldap_prev.dat wordlist too large $ wc -l timecell.txt ldap_prev.dat 372461 timecell.txt 3722878 ldap_prev.dat Thanks in... (2 Replies)
Discussion started by: krishna
2 Replies

3. Shell Programming and Scripting

fgrep fails...!?

Hi all, I need to transport a number of files from one server to other. I like to ensure the integrity using file checksum values. The action plan is, 1. create the list of checksum values for all the files using cksum command in source server. 2. Transfer all the files including the file... (5 Replies)
Discussion started by: r_sethu
5 Replies

4. UNIX for Dummies Questions & Answers

FGREP question

Hi, I need fgrep to search all files in the subdirectories in /var/spool/postfix/defer/... How can I issue such a command? (3 Replies)
Discussion started by: mojoman
3 Replies

5. Shell Programming and Scripting

fgrep command

How can we use fgrep command to search pattern on perticular field on a file. eg : I have a parren file having format cat patternfile SPA16S199982 SPA5S26330 I want to seach these pattern on FIRST field of File2(since other field has same data) and that too maching entirely. ... (10 Replies)
Discussion started by: morbid_angel
10 Replies

6. Shell Programming and Scripting

Awk Vs Fgrep

Hi All, I have 2 files new.txt and old.txt cat new.txt sku1|v1|v2|v3 sku2|v11|v22|v33 sku3|v11|v22|v33 cat old.txt sku1|vx1|vx2|vx3 sku2|vx11|vx22|vx33 sku3|v11|v22|v33 The key column in both files are first column itself. I want to get records in... (6 Replies)
Discussion started by: morbid_angel
6 Replies

7. Shell Programming and Scripting

Problem in Using fgrep Command with pattern file option

Hi, i am using fgrep command with following syntax fgrep -v -f pattern_file_name file file contains few line and have the pattern which i am giving in pattern file. My Problem is : its is not giving any output. while i am using fgrep -f pattern_file_name file it is showing all... (4 Replies)
Discussion started by: emresearch
4 Replies

8. Shell Programming and Scripting

Pipe and fgrep

Hi , Please help me resolve the below issue. I need to combine the below two command into one. grep 'ImanItemP' import.report| tr -s ' ' | cut -f2 -d ' ' > tmp.txt fgrep -v -f tmp.txt input.txt > reuired file.txt Thanks Ramesh (4 Replies)
Discussion started by: ramesh12621
4 Replies

9. UNIX for Dummies Questions & Answers

Fgrep -v

Using the fgrep command with the -v option. I have two files: file1: dog 1 cat 3 bird 5 fish 7file2: dog catUsing fgrep -v file2 file1 According to the fgrep man page, the output should be bird5 fish 7 but I can't seem to get it to work. Any help would be appreciated. (2 Replies)
Discussion started by: jimmyf
2 Replies

10. UNIX for Beginners Questions & Answers

Fgrep literal string from a file

have a file1 aaa-bbb-ccc-abcd aaa-bbb-ccc-bacd aaa-bbb-ccc-aaad aaa-bbb-ccc-ahave another file2 aaa-bbb-ccc-a fileusing the fgrep command, trying to have only the literal string returned. fgrep -f file2 file1 is returning aaa-bbb-ccc-abcd aaa-bbb-ccc-aaad aaa-bbb-ccc-aOnly looking for... (1 Reply)
Discussion started by: jimmyf
1 Replies
VARNISHNCSA(1)															    VARNISHNCSA(1)

NAME
varnishncsa - Display Varnish logs in Apache / NCSA combined log format SYNOPSIS
varnishncsa [-a] [-b] [-C] [-c] [-D] [-d] [-f] [-F format] [-I regex] [-i tag] [-n varnish_name] [-m tag:regex ...] [-P file] [-r file] [-V] [-w file] [-X regex] [-x tag] DESCRIPTION
The varnishncsa utility reads varnishd(1) shared memory logs and presents them in the Apache / NCSA "combined" log format. The following options are available: -a When writing to a file, append to it rather than overwrite it. -b Include log entries which result from communication with a backend server. If neither -b nor -c is specified, varnishncsa acts as if they both were. -C Ignore case when matching regular expressions. -c Include log entries which result from communication with a client. If neither -b nor -c is specified, varnishncsa acts as if they both were. -D Daemonize. -d Process old log entries on startup. Normally, varnishncsa will only process entries which are written to the log after it starts. -f Prefer the X-Forwarded-For HTTP header over client.ip in the log output. -F format Specify the log format used. If no format is specified the default log format is used. Currently it is: %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" Supported formatters are: %b Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent. %H The request protocol. Defaults to HTTP/1.0 if not known. %h Remote host. Defaults to '-' if not known. Defaults to 127.0.0.1 for backend requests. %{X}i The contents of request header line X. %l Remote logname (always '-') %m Request method. Defaults to '-' if not known. %q The query string, if no query string exists, an empty string. %{X}o The contents of response header line X. %r The first line of the request. Synthesized from other fields, so it may not be the request verbatim. %s Status sent to the client %t Time when the request was received, in HTTP date/time format. %U The request URL without any query string. Defaults to '-' if not known. %u Remote user from auth %{X}x Extended variables. Supported variables are: Varnish:time_firstbyte Time to the first byte from the backend arrived Varnish:hitmiss Whether the request was a cache hit or miss. Pipe and pass are considered misses. Varnish:handling How the request was handled, whether it was a cache hit, miss, pass, pipe or error. -m tag:regex only list records where tag matches regex. Multiple -m options are AND-ed together. -n Specifies the name of the varnishd instance to get logs from. If -n is not specified, the host name is used. -P file Write the process's PID to the specified file. -r file Read log entries from file instead of shared memory. -V Display the version number and exit. -w file Write log entries to file instead of displaying them. The file will be overwritten unless the -a option was specified. If varnishncsa receives a SIGHUP while writing to a file, it will reopen the file, allowing the old one to be rotated away. -X regex Exclude log entries which match the specified regular expression. -x tag Exclude log entries with the specified tag. If the -o option was specified, a tag and a regex argument must be given. varnishncsa will then only log for request groups which include that tag and the regular expression matches on that tag. SEE ALSO
o varnishd(1) o varnishhist(1) o varnishlog(1) o varnishstat(1) o varnishtop(1) HISTORY
The varnishncsa utility was developed by Poul-Henning Kamp in cooperation with Verdens Gang AS and Varnish Software AS. This manual page was written by Dag-Erling Smorgrav <des@des.no>. COPYRIGHT
This document is licensed under the same licence as Varnish itself. See LICENCE for details. o Copyright (c) 2006 Verdens Gang AS o Copyright (c) 2006-2011 Varnish Software AS AUTHOR
Dag-Erling Smorgrav 1.0 2010-05-31 VARNISHNCSA(1)
All times are GMT -4. The time now is 12:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy