Help with print out all relevant record if match particular pattern
Input file:
Desired output file:
As long as the record contains "content2" and it is shared the same "data*", I would like to output them.
The reason of data101_content1 and data101_content3 also print out is because they shared the same "data101" with content2.
Many thanks for any advice.
Last edited by perl_beginner; 12-21-2011 at 02:39 AM..
Hi friends,
This is my very first post on forum, so kindly excuse if my doubts are found too silly.
I am trying to automate a piece of routine work and this is where I am stuck at the moment-I need to grep a particular ID through a file containing many records(which start with <LRECORD> and end... (6 Replies)
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......
.......xyz: abz: .....
I have tried using awk and cut, bu the position of these values keep changing, so I can use awk and split it into columns. ... (14 Replies)
how to use "awk" to print any record has pattern not equal ? for example my file has 5 records & I need to get all lines which $1=10 or 20 , $2=10 or 20 and $3 greater than "130302" as it shown :
10 20 1303252348212B030
20 10 1303242348212B030
40 34 1303252348212B030
10 20 ... (14 Replies)
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
I have
2013-06-11 23:55:14 1Umexd-0004cm-IG <= user@domain.com
I need sed/awk operation on this, so that it should print the very next pattern only after the the pattern mach <=
ie only print user@domain.com (7 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
Input file:
pattern1 100 250 US
pattern2 50 3050 UK
pattern3 100 250 US
pattern1 70 1050 UK
pattern1 170 450 Mal
pattern2 40 750 UK
.
.
Desired Output file:
pattern1 100 250 US
pattern2 50 3050 UK
pattern1 170 450 Mal
pattern2... (3 Replies)
Discussion started by: cpp_beginner
3 Replies
LEARN ABOUT DEBIAN
sdf2fps
SDF2FPS(1) User Commands SDF2FPS(1)NAME
sdf2fps - sdf2fps
DESCRIPTION
usage: sdf2fps [-h] [--id-tag TAG] [--fp-tag TAG] [--num-bits INT]
[--errors {strict,report,ignore}] [-o FILENAME] [--software TEXT] [--type TEXT] [--decompress METHOD] [--binary] [--binary-msb]
[--hex] [--hex-lsb] [--hex-msb] [--base64] [--cactvs] [--decoder DECODER] [--pubchem] [filenames [filenames ...]]
Extract a fingerprint tag from an SD file and generate FPS fingerprints
positional arguments:
filenames
input SD files (default is stdin)
optional arguments:
-h, --help
show this help message and exit
--id-tag TAG
get the record id from TAG instead of the first line of the record
--fp-tag TAG
get the fingerprint from tag TAG (required)
--num-bits INT
use the first INT bits of the input. Use only when the last 1-7 bits of the last byte are not part of the fingerprint. Unexpected
errors will occur if these bits are not all zero.
--errors {strict,report,ignore}
how should structure parse errors be handled? (default=strict)
-o FILENAME, --output FILENAME
save the fingerprints to FILENAME (default=stdout)
--software TEXT
use TEXT as the software description
--type TEXT
use TEXT as the fingerprint type description
--decompress METHOD
use METHOD to decompress the input (default='auto', 'none', 'gzip', 'bzip2')
Fingerprint decoding options:
--binary
Encoded with the characters '0' and '1'. Bit #0 comes first. Example: 00100000 encodes the value 4
--binary-msb
Encoded with the characters '0' and '1'. Bit #0 comes last. Example: 00000100 encodes the value 4
--hex Hex encoded. Bit #0 is the first bit (1<<0) of the first byte. Example: 01f2 encodes the value x01xf2 = 498
--hex-lsb
Hex encoded. Bit #0 is the eigth bit (1<<7) of the first byte. Example: 804f encodes the value x01xf2 = 498
--hex-msb
Hex encoded. Bit #0 is the first bit (1<<0) of the last byte. Example: f201 encodes the value x01xf2 = 498
--base64
Base-64 encoded. Bit #0 is first bit (1<<0) of first byte. Example: AfI= encodes value x01xf2 = 498
--cactvs
CACTVS encoding, based on base64 and includes a version and bit length
--decoder DECODER
import and use the DECODER function to decode the fingerprint
shortcuts:
--pubchem
decode CACTVS substructure keys used in PubChem. Same as --software=CACTVS/unknown --type 'CACTVSE_SCREEN/1.0 extended=2'
--fptag=PUBCHEM_CACTVS_SUBSKEYS --cactvs
sdf2fps 1.0 June 2012 SDF2FPS(1)