Sponsored Content
Top Forums Shell Programming and Scripting How to extract specific information? Post 302914423 by the_simpsons on Monday 25th of August 2014 09:29:10 PM
Old 08-25-2014
How to extract specific information?

hi, i have a file A like this:

Code:
******************* No 2823 ********************
contig15205-
                    G383C4U02H4G80+ is in contig15205-
                    G383C4U02HGLXM- is in contig15205-
                    G383C4U01C3HIZ+ is in contig15205-
                    G383C4U02HDLAB+ is in contig15205-
                    G383C4U01DVIXN+ is in contig15205-
                    G383C4U01AT850+ is in contig15205-
                    G383C4U01AVD5W- is in contig15205-
                    G383C4U02JAADO- is in contig15205-
                    G383C4U01ETXWQ+ is in contig15205-
                    G383C4U02GH68R- is in contig15205-
                    G383C4U01A59A3- is in G383C4U02GH68R-
                    G383C4U02HQGV3+ is in contig15205-
                    G383C4U01BJG92- is in contig15205-
                    G383C4U02JP8KO+ is in contig15205-
                    G383C4U02HZI67- is in contig15205-
******************* Con 2824 ********************
contig15207-
                    G383C4U01DJJKO+ is in contig15207-
                    G24KUME16J2AZZ+ is in contig15207-
                    G383C4U02HECZI- is in contig15207-
                    G383C4U02F2S43+ is in contig15207-
G383C4U01AQEWM+
******************* Single 2825 ********************
contig15209+
                    G383C4U01E15DK+ is in contig15209+
                    G383C4U02FZUMZ- is in contig15209+
                    G383C4U01EMTPI- is in contig15209+
                    G383C4U01C3ZHB- is in contig15209+
                    G383C4U02I7359+ is in contig15209+
                    G383C4U01AEZA8+ is in contig15209+
******************* Contig 2826 ********************
contig15210+

......

And i have a file B containing the key ids i want, like this:
Code:
No 2823
Con 2824

How can i a get a file contain only the detailed information for each key id of interest?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do you extract the information from a library?

hi all, i am quite new with Perl (just 1 week of experience) and i am suppose to understand the usage of library, which i can't, anyway... i came across this library...i think from the linux redhat redhat.linux.lib.pl, there are a couple of functions there that can be used to retrieve information... (3 Replies)
Discussion started by: mercz
3 Replies

2. Shell Programming and Scripting

AWK to extract information

Hi all, I am working on a shell script to extract information from a file that has output from Oracle sqlplus. The problem is that the output of a single line is spread across multiple lines and i do not know as how to extract the particular filed at ones,which spans multiple lines.... (2 Replies)
Discussion started by: harris2107
2 Replies

3. Shell Programming and Scripting

Using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please? ... (1 Reply)
Discussion started by: pazman
1 Replies

4. Shell Programming and Scripting

Extract various information from a log file

Hye ShamRock If you can help me with this difficult task for me then it will save my day Logs : ================================================================================================================== ... (4 Replies)
Discussion started by: SilvesterJ
4 Replies

5. Shell Programming and Scripting

Extract information into large variable

Hello people :) That's here my first message to your forum, so I guess it would be fine ^^ I have a request about a code I want to use. Actually, my system use a large variable, including much informations but those informations can change by more and I want to extract one of thoses... (26 Replies)
Discussion started by: WolwX
26 Replies

6. Shell Programming and Scripting

How to extract information from a file?

Hi, i have a file like this: <Iteration> <Iteration_iter-num>3</Iteration_iter-num> <Iteration_query-ID>lcl|3_0</Iteration_query-ID> <Iteration_query-def>G383C4U01EQA0A length=197</Iteration_query-def> <Iteration_query-len>197</Iteration_query-len> ... (9 Replies)
Discussion started by: the_simpsons
9 Replies

7. Shell Programming and Scripting

Help with shell script to extract certain information

Hi, I have a file which I need to programmatically split into two files. All the information in the file before pattern "STOP HERE" is to be stripped and output into one file while everything after "STOP HERE" is to be output into a separate file. I would appreciate help on how to do... (8 Replies)
Discussion started by: PTL
8 Replies

8. Shell Programming and Scripting

Extract Specific Information from a particular field

Hi, I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference. My file contains information below ... (4 Replies)
Discussion started by: rramkrishnas
4 Replies

9. Shell Programming and Scripting

Extract information from file

Gents, If is possible please help. I have a big file (example attached) which contends exactly same value in column, but from column 2 to 6 these values are diff. I will like to compile for all records all columns like the example attached in .csv format (output.rar ).. The last column in the... (11 Replies)
Discussion started by: jiam912
11 Replies

10. Shell Programming and Scripting

Extract information from file

In a particular directory, there can be 1000 files like below. filename is job901.ksh #!/bin/ksh cront -x << EOJ submit file=$PRODPATH/scripts/genReport.sh maxdelay=30 &node=xnode01 tname=job901 &pfile1=/prod/mldata/data/test1.dat ... (17 Replies)
Discussion started by: vedanta
17 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 10:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy