Sponsored Content
Full Discussion: extract text from a file
Top Forums Shell Programming and Scripting extract text from a file Post 302430794 by loperam on Friday 18th of June 2010 06:38:17 PM
Old 06-18-2010
extract text from a file

I have been reading several posts regarding how to extract text from a file, but none of those have helped me for what I need.
This is my problem: I need to extract the text after my pattern
So my line is:
485.74 6589.5 Log likelihood: 1485.79

My pattern is 'Log likelihood:'

and I need only the rest of the line: 1485.79

I can use "grep -w 'Log likelihood:' file" but get the whole line

How can I do it if i want only the beginning of the line: "485.74 6589.5" ?

Thanks guys
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract data from a text file

Hello All, Is there an easy way to extract data from a text file? The text file is actually a dump of a 2 page report with 6 columns and 122 lines. Example is Report Tile Type Product 1 Product 2 Product 3 Product 4... (1 Reply)
Discussion started by: negixx
1 Replies

2. Shell Programming and Scripting

How to extract text from xml file

I have some xml files that got created by exporting a website from RedDot. I would like to extract the cost, course number, description, and meeting information. <?xml version="1.0" encoding="UTF-16" standalone="yes" ?> - <PAG PAG0="3AE6FCFD86D34896A82FCA3B7B76FF90" PAG3="525312"... (3 Replies)
Discussion started by: chrisf
3 Replies

3. Shell Programming and Scripting

how to extract columns from a text file

Hi, In ksh, I have a file with similar rows as follows: Department = 1234 G/L Asset Acct No = 12.0000. 2/29/2008 Department = 1234 G/L Asset Acct No = 13.0000. 3/29/2008. I want to create a new text file that contains only the numbers and date: 1234 12.0000. 2/29/2008 1234 13.0000. ... (16 Replies)
Discussion started by: ihot
16 Replies

4. Programming

c program to extract text between two delimiters from some text file

needa c program to extract text between two delimiters from some text file. and then storing them in to diffrent variables ? text file like 0: abc.txt ========= aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
Discussion started by: kukretiabhi13
7 Replies

5. UNIX for Dummies Questions & Answers

How to extract text from a line in file

I have a file abc.txt as below : <dbport oa_var="s_dbport" oa_type="EXT_PORT" base="1521" step="1" range="-1" label="Database Port">1616</dbport> <rpc_port oa_var="s_rpcport" oa_type="PORT" base="1626" step="1" range="-1" label="RPC Port">1721</rpc_port> <web_ssl_port oa_var="s_webssl_port"... (7 Replies)
Discussion started by: findprakash
7 Replies

6. Shell Programming and Scripting

extract particular lines from text file

I have two files file A which have a number in every row and file B which contains few hundred thousand rows with about 300 characters in each row (csv) What I need is to extract whole rows from B file (only these which numbers are indicated in A file) I also need to use cygwin. Any... (7 Replies)
Discussion started by: gunio
7 Replies

7. Shell Programming and Scripting

extract part of text file

I need to extract the following lines from this text and put it in different files. From xxxx@gmail.com Thu Jun 10 21:15:46 2010 Return-Path: <xxxxx@gmail.com> X-Original-To: xxx@localhost Delivered-To:xxxx@localhost Received: from ubuntu (localhost ) by ubuntu (Postfix) with ESMTP... (11 Replies)
Discussion started by: waxo
11 Replies

8. Shell Programming and Scripting

extract a word from text file name

Hi i want to extract the word present before .txt in the text file. For example, Sample_ab_a.txt ----------> i need 'a' Sample_abc_b.txt -----------> i need 'b' Can anyone help me in getting the word extracted (5 Replies)
Discussion started by: Sindhuap
5 Replies

9. Shell Programming and Scripting

Extract sentence and its details from a text file based on another file of sentences

Hi I have two text files. The first file is TEXTFILEONE.txt as given below: <Text Text_ID="10155645315851111_10155645333076543" From="460350337461111" Created="2011-03-16T17:05:37+0000" use_count="123">This is the first text</Text> <Text Text_ID="10155645315851111_10155645317023456"... (7 Replies)
Discussion started by: my_Perl
7 Replies

10. Shell Programming and Scripting

To extract query from a text file.

Hi, I've a txt file with the following contents: variable = "select name, emp_id, org_name " variable = variable + " from table_name where " variable = variable + " condition_1 = ABC and " variable = variable + " condition_2 = DEF " varaible = variable + " order by other condition " ... (7 Replies)
Discussion started by: arjun_arippa
7 Replies
LODSCORE(1)						      General Commands Manual						       LODSCORE(1)

NAME
lodscore - compares likelihoods at locally optimal theta SYNOPSIS
lodscore [options] ipedfile.dat pedfile.dat DESCRIPTION
This manual page documents briefly the lodscore command. In fact this is a very raw intend to provide a manpage because the Debian GNU/Linux distribution requires each program to have a manpage. Any enhancement would be greatly apreciated. lodscore is part of the fastlink software package. Lodscore compares -2log(likelihood) at the locally optimal theta to -2log(likelihood) at a theta that is 1/2 in every component (i.e. each locus unlinked to all the rest). In LINKAGE ILINK more likelihood function evaluations are done after the last printed iteration line, but these likelihood function evaluations are unnecessary (see paper2.ps from the fastlink-doc Debian package for more details). OPTIONS
There might be options but I did not found any information about them. Please foreward any information about them to <tille@debian.org> SEE ALSO
ilink(1), linkmap(1), mlink(1), unknown(1). Word-Wide-Web: http://www.ncbi.nlm.nih.gov/CBBResearch/Schaffer/fastlink.html AUTHOR
: Alejandro Schaeffer <schaffer@helix.nih.gov> and others This manual page was written by Andreas Tille <tille@debian.org>, for the Debian GNU/Linux system (but may be used by others). April 15, 2003 LODSCORE(1)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy