Sponsored Content
Full Discussion: grep from file
Top Forums Shell Programming and Scripting grep from file Post 302184063 by jaydeep_sadaria on Thursday 10th of April 2008 12:03:30 PM
Old 04-10-2008
grep

plz also suggest for below mention op if possible.

@ CONNECT('BSCANGR')
RXCDP:RXOTRX-280-1;
RXCDP:RXOTRX-48-2
RXCDP:RXOTRX-48-3
RXCDP:RXOTRX-194-11
RXCDP:RXOTRX-147-0
@ DISCONNECT
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep for certain files using a file as input to grep and then move

Hi All, I need to grep few files which has words like the below in the file name , which i want to put it in a file and and grep for the files which contain these names and move it to a new directory , full file name -C20091210.1000-20091210.1100_SMGBSC3:1000... (2 Replies)
Discussion started by: anita07
2 Replies

2. Shell Programming and Scripting

Grep pattern from different file and display if it exists in the required file

Hi, I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which contains rubbish information just to fill the page which is of no use. this is... (3 Replies)
Discussion started by: abinash
3 Replies

3. Shell Programming and Scripting

script to grep a pattern from file compare contents with another file and replace

Hi All, Need help on this I have 2 files one file file1 which has several entries as : define service{ hostgroup_name !host1,!host5,!host6,.* service_description check_nrpe } define service{ hostgroup_name !host2,!host4,!host6,.* service_description check_opt } another... (2 Replies)
Discussion started by: namitai
2 Replies

4. Shell Programming and Scripting

Shell Script to grep Job File name and Log File name from crontab -l

Hello, I am new to shell scripting. I need to write a shell script where i can grep the name of file ie. .sh file and log file from crontab -l. #51 18 * * * /home/oracle/refresh/refresh_ug634.sh > /home/oracle/refresh/refresh_ug634.sh.log 2>&1 #40 17 * * * /home/oracle/refresh/refresh_ux634.sh... (1 Reply)
Discussion started by: guptra
1 Replies

5. Shell Programming and Scripting

Diff between grep .* file name and grep '.*' filename

Hi, Can anyone let me know what is difference between grep .* foo.c grep '.*' foo.c I am not able to understand what is exact difference. Thanks in advance (2 Replies)
Discussion started by: SasDutta
2 Replies

6. UNIX for Dummies Questions & Answers

Grep? - using a file of terms to search another file when the information is on a different line

I have a flat file that looks like this, let's call it Chromosome_9.txt: FT /Gene_Name="Guanyl-Acetylase 9" FT /Gene_Number"36952" FT /Gene_Name="Endoplasmic Luciferase" FT /Gene_Number"36953" FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies

7. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

8. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies

9. Shell Programming and Scripting

Grep a log file starting from a specific time to the end of file

I have a log file which have a date and time at the start of every line. I need to search the log file starting from a specific time to the end of file. For example: Starting point: July 29 2018 21:00:00 End point : end of file My concern is what if the pattern of `July 29 2018 21:00:00`... (3 Replies)
Discussion started by: erin00
3 Replies

10. UNIX for Beginners Questions & Answers

Grep: Retrieve two strings from one file to find them anyone on line in another file

I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
AGGREGATE(1)                                                  General Commands Manual                                                 AGGREGATE(1)

NAME
aggregate - optimise a list of route prefixes to help make nice short filters SYNOPSIS
aggregate [-m max-length] [-o max-opt-length] [-p default-length] [-q] [-t] [-v] DESCRIPTION
Takes a list of prefixes in conventional format on stdin, and performs two optimisations to attempt to reduce the length of the prefix list. The first optimisation is to remove any supplied prefixes which are superfluous because they are already included in another supplied pre- fix. For example, 203.97.2.0/24 would be removed if 203.97.0.0/17 was also supplied. The second optimisation identifies adjacent prefixes that can be combined under a single, shorter-length prefix. For example, 203.97.2.0/24 and 203.97.3.0/24 can be combined into the single prefix 203.97.2.0/23. OPTIONS
-m max-length Sets the maximum prefix length for entries read from stdin max_length bits. The default is 32. Prefixes with longer lengths will be discarded prior to processing. -o max-opt-length Sets the maximum prefix length for optimisation to max-opt-length bits. The default is 32. Prefixes with longer lengths will not be subject to optimisation. -p default-length Sets the default prefix length. There is no default; without this option a prefix without a mask length is treated as invalid. Use -p 32 -m 32 -o 32 to aggregate a list of host routes specified as bare addresses, for example. -q Sets quiet mode -- instructs aggregate never to generate warning messages or other output on stderr. -t Silently truncate prefixes that seem to have an inconsistent prefix: e.g. an input prefix 203.97.2.226/24 would be truncated to 203.97.2.0/24. Without this option an input prefix 203.97.2.226/24 would not be accepted, and a warning about the inconsistent mask would be generated. -v Sets verbose mode. This changes the output format to display the source line number that the prefix was obtained from, together with a preceding "-" to indicate a route that can be suppressed, or a "+" to indicate a shorter-prefix aggregate that was added by aggre- gate as an adjacency optimisation. Note that verbose output continues even if -q is selected. DIAGNOSTICS
Aggregate exits 0 on success, and >0 if an error occurs. EXAMPLES
The following list of prefixes: 193.58.204.0/22 193.58.208.0/22 193.193.160.0/22 193.193.168.0/22 193.243.164.0/22 194.126.128.0/22 194.126.132.0/22 194.126.134.0/23 194.151.128.0/19 195.42.240.0/21 195.240.0.0/16 195.241.0.0/16 is optimised as followed by aggregate (output shown using the -v flag): aggregate: maximum prefix length permitted will be 24 [ 0] + 193.58.204.0/21 [ 1] - 193.58.204.0/22 [ 2] - 193.58.208.0/22 [ 3] 193.193.160.0/22 [ 4] 193.193.168.0/22 [ 5] 193.243.164.0/22 [ 0] + 194.126.128.0/21 [ 6] - 194.126.128.0/22 [ 7] - 194.126.132.0/22 [ 8] - 194.126.134.0/23 [ 9] 194.151.128.0/19 [ 10] 195.42.240.0/21 [ 0] + 195.240.0.0/15 [ 11] - 195.240.0.0/16 [ 12] - 195.241.0.0/16 Note that 193.58.204.0/22 and 193.58.208.0/22 were combined under the single prefix 193.58.204.0/21, and 194.126.134.0/23 was suppressed because it was included in 194.126.132.0/22. The number in square brackets at the beginning of each line indicates the original line num- ber, or zero for new prefixes that were introduced by aggregate. The output without the -v flag is as follows: 193.58.204.0/21 193.193.160.0/22 193.193.168.0/22 193.243.164.0/22 194.126.128.0/21 194.151.128.0/19 195.42.240.0/21 195.240.0.0/15 SEE ALSO
aggregate-ios(1) HISTORY
Aggregate was written by Joe Abley <jabley@mfnx.net>, and has been reasonably well tested. It is suitable for reducing customer prefix fil- ters for production use without extensive hand-proving of results. Autoconf bits were donated by Michael Shields <michael.shields@mfn.com>. The -t option was suggested by Robin Johnson <rob- bat2@fermi.orbis-terrarum.net>, and the treatment of leading zeros on octet parsing was changed following comments from Arnold Nipper <arnold@nipper.de>. An early version of aggregate would attempt to combine adjacent prefixes regardless of whether the first prefix lay on an appropriate bit boundary or not (pointed out with great restraint by Robert Noland <rnoland@2hip.net>). BUGS
Common unix parsing of IPv4 addresses understands the representation of individual octets in octal or hexadecimal, following a "0" or "0x" prefix, respectively. That convention has been deliberately disabled here, since resources such as the IRR do not follow the convention, and confusion can result. For extremely sensitive applications, judicious use of the -v option together with a pencil and paper is probably advisable. Joe Abley 2001 November 2 AGGREGATE(1)
All times are GMT -4. The time now is 03:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy