Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

qsgrep(1) [debian man page]

QSGREP(1)							  qsgrep man page							 QSGREP(1)

NAME
qsgrep - Print matching patterns within a file. SYNOPSIS
qsgrep -e <pattern> -o <sub string> [<path>] DESCRIPTION
qsgrep is a simple tool to search patterns within files. It uses regular expressions to find patterns and prints the submatches within a pre-defined format string. OPTIONS
-e <pattern> Specifes the search pattern. -o <string> Defines the output string where $0-$9 are substituted by the submatches of the regular expression. <path> Defines the input file to process. qsgrep reads from from standard input if this parameter is omitted. EXAMPLE
Shows the IP addresses of clients causing mod_qos(031) messages): qsgrep -e 'mod_qos(031).*, c=([0-9.]*)' -o 'ip=$1' error_log SEE ALSO
qsexec(1), qsfilter2(1), qsgeo(1), qslog(1), qslogger(1), qspng(1), qsrotate(1), qssign(1), qstail(1) AUTHOR
Pascal Buchbinder, http://opensource.adnovum.ch/mod_qos/ mod_qos utilities 10.8 June 2012 QSGREP(1)

Check Out this Related Man Page

QSPNG(1)							  qspng man page							  QSPNG(1)

NAME
qspng - Utility to draw a png graph from qslog(1) output data. SYNOPSIS
qspng -i <stat_log_file> -p <parameter> -o <out_file> [-10] DESCRIPTION
qspng is a tool to generate png (portable network graphics) raster images files from semicolon separated data generated by the qslog util- ity. It reads up to the first 1440 entries (24 hours) and prints a graph using the values defined by the 'parameter' name. OPTIONS
-i <stats_log_file> Input file to read data from. -p <parameter> Parameter name, e.g. r/s or usr. -o <out_file> Output file name, e.g. stat.png. SEE ALSO
qsexec(1), qsfilter2(1), qsgeo(1), qsgrep(1), qslogger(1), qslog(1), qsrotate(1), qssign(1), qstail(1) AUTHOR
Pascal Buchbinder, http://opensource.adnovum.ch/mod_qos/ mod_qos utilities 10.8 June 2012 QSPNG(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to replace certain patterns in a file thru unix!!

Hi Friends, well what i want to do is that suppose i have a file say like .... ronaldduckdancecoolman donaldmuckdancepooltactics fonaldguckdancetoolbutcomps .... okok i agree this is a ridiculous data for a file. :-) now i want that the characters in each line fromposition 16 to say 19... (6 Replies)
Discussion started by: mexx_freedom
6 Replies

2. Shell Programming and Scripting

perl - how do i find out if a file doesn't contain a pattern?

how do i check a file for a pattern and perform an action if it doesn't exist? i know how to search a file for a pattern. you just place it in an array like so. #!/usr/bin/perl my $data_file = "file.txt"; open DATA, "$data_file"; my @array_of_data = <DATA>; if ($_ =~ m/pattern/i) {... (4 Replies)
Discussion started by: mjays
4 Replies

3. Shell Programming and Scripting

Perl: Match a line with multiple search patterns

Hi I'm not very good with the serach patterns and I'd need a sample how to find a line that has multiple patterns. Say I want to find a line that has "abd", "123" and "QWERTY" and there can be any characters or numbers between the serach patterns, I have a file that has thousands of lines and... (10 Replies)
Discussion started by: Juha
10 Replies

4. Shell Programming and Scripting

How to get value between patterns

Gurus, If is my file <PRODUCT_TYPE>DN</PRODUCT_TYPE><SERVER_NAME>testserver1</SERVER_NAME><FLAVOR>Windows</FLAVOR><OS>Windows NT</OS><CPU>4</CPU> <PRODUCT_TYPE>PN</PRODUCT_TYPE><SERVER_NAME>testserver2</SERVER_NAME><FLAVOR>Windows</FLAVOR><OS>Windows NT</OS><CPU>3</CPU> ... (6 Replies)
Discussion started by: sirababu
6 Replies

5. UNIX for Advanced & Expert Users

Best way to search for patterns in huge text files

I have the following situation: a text file with 50000 string patterns: abc2344536 gvk6575556 klo6575556 .... and 3 text files each with more than 1 million lines: ... 000000 abc2344536 46575 0000 000000 abc2344536 46575 4444 000000 abc2344555 46575 1234 ... I... (8 Replies)
Discussion started by: andy2000
8 Replies

6. UNIX for Dummies Questions & Answers

Grep AND

Hello all, I have many files in a directory and I'm trying to read each file in the directory, search for four patterns and return the name of the file only if it contains each of the 4 patterns. I'm familiar with using egrep -l "(pattern1|pattern2)" *, but it seems like doing something similar... (4 Replies)
Discussion started by: CPP_code
4 Replies

7. Shell Programming and Scripting

sed search alternately for patterns

hi all, I am trying to do search on a gzip file. The file has <pattern1> Data.. <pattern2> data <pattern1> data <patter2> I want to print each pattern 1 and the corrresponding pattern2. If pattern 2 fails to appear and pattern 1 appears, I do not want to print pattern1 and... (3 Replies)
Discussion started by: baskar123
3 Replies

8. Shell Programming and Scripting

Searching for multiple patterns in a file

Hi All, I have a file in which i have to search for a pattern from the beginning of the file and if the pattern is found , then i have to perform a reverse search from that line to the beginning of the file to get the first occurrence of another pattern. sample input file hey what are you... (8 Replies)
Discussion started by: Kesavan
8 Replies

9. Shell Programming and Scripting

Need help in retrieving log from a UNIX file using the search patterns

Hi everyone, I am trying to retrieve certain log from a big file. The log size can be from 200 - 600 lines. I have 3 search patterns, out of which 2 (first and last lines) search patterns are common for all the transactions but 3rd search pattern (occurs in the middle of transaction) is... (5 Replies)
Discussion started by: msrayudu
5 Replies

10. Shell Programming and Scripting

search pattern and mark/tag

Hi All, I have to search for patterns from a pattern file in a file and mark the matching lines. Input File: Student1 60 30 Student2 71 91 Student3 88 98 Pattern file: Student1 Fail Student2 Pass Student2 Pass Desired output: Student1 60 30 Fail Student2 71 91 Pass (5 Replies)
Discussion started by: saint2006
5 Replies

11. Shell Programming and Scripting

How to search Multiple patterns in unix

Hi, I tried to search multiple pattern using awk trans=1234 reason=LN MISMATCH rec=`awk '/$trans/ && /'"$reason"'/' file` whenevr i tried to run on command promt it is executing but when i tried to implment same logic in shell script,it is failing i.e $rec is empty ... (6 Replies)
Discussion started by: ns64110
6 Replies

12. Shell Programming and Scripting

Script using Sed :Search all patterns & after the last Patter, insert a newLine with Comma Sep Value

I am trying to search the pattern "ARS (11)" and after the LAST pattern, i am trying to open new line and enter text using sed. My Existing Text file is Users.txtpaul, Paul Smith, Stevn Smiley, REQ000001, ARS (11) sam, Sam Martin, Stevn Smiley, REQ000001, ARS (11) mike, Mike Conway, Stevn... (8 Replies)
Discussion started by: evrurs
8 Replies

13. Shell Programming and Scripting

Find common patterns in multiple file

Hi, I need help to find patterns that are common or matched in a specified column in multiple files. File1.txt ID1 555 ID23 8857 ID4 4454 ID05 555 File2.txt ID74 4454 ID96 555 ID322 4454 (4 Replies)
Discussion started by: redse171
4 Replies

14. Shell Programming and Scripting

Print lines after matching two pattern

would like to print everything after matching two patterns AAA and BBB. output : CCC ZZZ sample data : AAA BBB CCC ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies

15. Shell Programming and Scripting

Performance assessment of using single or combined pattern matching

Hi, I want to know which pattern matching technique will be giving better performance and quick result. I will be having the patterns in a file and want to read that patterns and search through a whole file of say 70 MB size. whether if i initially create a pattern matching string while... (7 Replies)
Discussion started by: ananan
7 Replies