Sponsored Content
Top Forums Shell Programming and Scripting Extracting a portion of a data file with identifier Post 302378663 by jim mcnamara on Tuesday 8th of December 2009 12:06:37 PM
Old 12-08-2009
Code:
pattern='WERTF'
awk -v pat="$pattern" 'NF==1 {first=$1}
                               $NF==pat { print first, $0} ' infile > outfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting a portion of data from a very large tab delimited text file

Hi All I wanted to know how to effectively delete some columns in a large tab delimited file. I have a file that contains 5 columns and almost 100,000 rows 3456 f g t t 3456 g h 456 f h 4567 f g h z 345 f g 567 h j k lThis is a very large data file and tab delimited. I need... (2 Replies)
Discussion started by: Lucky Ali
2 Replies

2. Shell Programming and Scripting

Removing a portion of data in a file

Hi, I have a folder that contains many (multiple) files 1.fasta 2.fasta 3.fasta 4.fasta 5.fasta . . 100's of files Each such file have data in the following format for example: vi 1.fasta Code: >AB_1 MLKKPIIIGVTGGSGGGKTSVSRAILDSFPNARIAMIQHDSYYKDQSHMSFEERVKTNYDHPLAFDTDFM (6 Replies)
Discussion started by: Lucky Ali
6 Replies

3. Shell Programming and Scripting

parsing a portion of Data from a text file

Hi All, I need some help to effectively parse out a subset of results from a big results file. Below is an example of the text file. Each block that I need to parse starts with "Output of GENE for sequence file 100.fasta" (next block starts with another number). I have given the portion of... (8 Replies)
Discussion started by: Lucky Ali
8 Replies

4. Shell Programming and Scripting

Help on extracting portion of string

Hi Gurus, I've some sample of my log information as shown below. -> Processing ABCD123456 This is tp version 372.04.57 (release 700, unicode enabled) This is R3trans version 6.14 (release 700 - 05.03.09 - 08:28:00). unicode enabled version R3trans finished (0000). Warning: Parameter... (1 Reply)
Discussion started by: superHonda123
1 Replies

5. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

6. UNIX for Dummies Questions & Answers

Extracting data from file

I am trying to compare the data in lines 3 & 5 to see if they match up to the '-S570' (see first code set, all proprietary information has been removed from code set) spawn telnet Trying ... Connected to CA-LOS1234-ASE-S570.cl . Escape character is '^]'. CA-LOS1234-ASE-S570 Username: ... (1 Reply)
Discussion started by: slipshft
1 Replies

7. Shell Programming and Scripting

Extracting a portion of the string and comparing

I have 2 text files say file1.txt and file2.txt . Some of the sample records for file1.txt were shown below: XXXXX12345XXXXXXX12 3456789YYYYY XXXXXXXXXX12345XX123457485YYYYY XX12345XXXXXXXXXX123454658YYYYY for file2.txt, some of the sample records were shown below: ... (5 Replies)
Discussion started by: bobby1015
5 Replies

8. Shell Programming and Scripting

error while extracting a line from a file based on identifier

here is the content of input file CREATE TABLE `bla bla bla` ( `allianceSiteId` int(11) DEFAULT NULL, `trunkGroupsId` int(11) DEFAULT NULL, `lastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY `allianceSiteId`... (4 Replies)
Discussion started by: vivek d r
4 Replies

9. Shell Programming and Scripting

Extracting a portion of the filename

Hi I would like to extract the first portion of filename from a list of files. The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file. K (6 Replies)
Discussion started by: kamal_p_99
6 Replies

10. UNIX for Beginners Questions & Answers

Extracting directory portion.

Dear Experts, I have some directory structure something like follows. I would like to cut portion of it. Would you please help me? I have to run this on several sql's. The directory path is dynamic. I have cut what comes after first "sql" string. Input:... (3 Replies)
Discussion started by: srikanth38
3 Replies
QTab(3qt)																 QTab(3qt)

NAME
QTab - The structures in a QTabBar SYNOPSIS
#include <qtabbar.h> Inherits Qt. Public Members QTab () virtual ~QTab () QTab ( const QString & text ) QTab ( const QIconSet & icon, const QString & text = QString::null ) void setText ( const QString & text ) QString text () const void setIconSet ( const QIconSet & icon ) QIconSet * iconSet () const void setRect ( const QRect & rect ) QRect rect () const void setEnabled ( bool enable ) bool isEnabled () const void setIdentifier ( int i ) int identifier () const DESCRIPTION
The QTab class provides the structures in a QTabBar. This class is used for custom QTabBar tab headings. See also QTabBar and Advanced Widgets. MEMBER FUNCTION DOCUMENTATION
QTab::QTab () Constructs an empty tab. All fields are set to empty. QTab::QTab ( const QString & text ) Constructs a tab with the text text. QTab::QTab ( const QIconSet & icon, const QString & text = QString::null ) Constructs a tab with an icon and the text, text. QTab::~QTab () [virtual] Destroys the tab and frees up all allocated resources. QIconSet * QTab::iconSet () const Return the QIconSet of the QTab. int QTab::identifier () const Return the QTab's identifier. bool QTab::isEnabled () const Returns TRUE if the QTab is enabled; otherwise returns FALSE. QRect QTab::rect () const Return the QRect for the QTab. void QTab::setEnabled ( bool enable ) If enable is TRUE enable the QTab, otherwise disable it. void QTab::setIconSet ( const QIconSet & icon ) Sets the tab's iconset to icon void QTab::setIdentifier ( int i ) Set the identifier for the QTab to i. Each QTab's identifier within a QTabBar must be unique. void QTab::setRect ( const QRect & rect ) Set the QTab QRect to rect. void QTab::setText ( const QString & text ) Sets the text of the tab to text. QString QTab::text () const Returns the text of the QTab label. SEE ALSO
http://doc.trolltech.com/qtab.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtab.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QTab(3qt)
All times are GMT -4. The time now is 01:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy