Sponsored Content
Top Forums Shell Programming and Scripting How to extract text from STRING to end of line? Post 302822207 by rajamadhavan on Monday 17th of June 2013 06:38:41 AM
Old 06-17-2013
It would be better to past your input file under code tags

This will extract you the last column on a tab delimited file..

Code:
awk -F"\t" '{print $NF}' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract digits at end of string

I have a string like xxxxxx44. What's the best way to extract the digits (one or more) in a ksh script? Thanks (6 Replies)
Discussion started by: offirc
6 Replies

2. Shell Programming and Scripting

extract a particular start and end pattern from a line

hi In the foll example the whole text in a single line.... i want to extract text from IPTel to RTCPBase.h. want to use this acrooss the whole file Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1... (7 Replies)
Discussion started by: manish205
7 Replies

3. UNIX for Dummies Questions & Answers

Using sed to extract a substring at end of line

This is the line that I am using: sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt and suppose that test.txt contains the following lines: http://www.example.com/200904/AUS.txt http://www.example.com/200903/_RUS.txt http://www.example.com/200902/.FRA.txt What I expected to see in results.txt... (6 Replies)
Discussion started by: figaro
6 Replies

4. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

5. Shell Programming and Scripting

Extract X words from end of line, minus last keynumber X

The file contains one line of text followed by a number. I want to take the number X at the end, take it out and display the last X words. X is the key telling me how many words from the end that I want and X will always be less than the number of words, so no problem there. Example input and... (4 Replies)
Discussion started by: fubaya
4 Replies

6. Shell Programming and Scripting

sed - Find a String and append a text end of the Line

Hi, I have a File, which have multiple rows. Like below 123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY 123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY 123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies

7. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

8. Red Hat

How to add a new string at the end of line by searching a string on the same line?

Hi, I have a file which is an extract of jil codes of all autosys jobs in our server. Sample jil code: ************************** permission:gx,wx date_conditions:yes days_of_week:all start_times:"05:00" condition: notrunning(appDev#box#ProductLoad)... (1 Reply)
Discussion started by: raghavendra
1 Replies

9. Shell Programming and Scripting

How can I extract digits at the end of a string in UNIX shell scripting?

How can I extract digits at the end of a string in UNIX shell scripting or perl? cat file.txt abc_d123_4567.txt A246_B789.txt B123cc099.txt a123_B234-012.txt a13.txt What can I do here? Many thanks. cat file.txt | sed "s/.txt$//" | ........ 4567 789 099 012 13 (11 Replies)
Discussion started by: mingch
11 Replies

10. Shell Programming and Scripting

Perl to extract values and print at end of each line

In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies
slarrj.f(3)							      LAPACK							       slarrj.f(3)

NAME
slarrj.f - SYNOPSIS
Functions/Subroutines subroutine slarrj (N, D, E2, IFIRST, ILAST, RTOL, OFFSET, W, WERR, WORK, IWORK, PIVMIN, SPDIAM, INFO) SLARRJ performs refinement of the initial estimates of the eigenvalues of the matrix T. Function/Subroutine Documentation subroutine slarrj (integerN, real, dimension( * )D, real, dimension( * )E2, integerIFIRST, integerILAST, realRTOL, integerOFFSET, real, dimension( * )W, real, dimension( * )WERR, real, dimension( * )WORK, integer, dimension( * )IWORK, realPIVMIN, realSPDIAM, integerINFO) SLARRJ performs refinement of the initial estimates of the eigenvalues of the matrix T. Purpose: Given the initial eigenvalue approximations of T, SLARRJ does bisection to refine the eigenvalues of T, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial guesses for these eigenvalues are input in W, the corresponding estimate of the error in these guesses in WERR. During bisection, intervals [left, right] are maintained by storing their mid-points and semi-widths in the arrays W and WERR respectively. Parameters: N N is INTEGER The order of the matrix. D D is REAL array, dimension (N) The N diagonal elements of T. E2 E2 is REAL array, dimension (N-1) The Squares of the (N-1) subdiagonal elements of T. IFIRST IFIRST is INTEGER The index of the first eigenvalue to be computed. ILAST ILAST is INTEGER The index of the last eigenvalue to be computed. RTOL RTOL is REAL Tolerance for the convergence of the bisection intervals. An interval [LEFT,RIGHT] has converged if RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|). OFFSET OFFSET is INTEGER Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET through ILAST-OFFSET elements of these arrays are to be used. W W is REAL array, dimension (N) On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are estimates of the eigenvalues of L D L^T indexed IFIRST through ILAST. On output, these estimates are refined. WERR WERR is REAL array, dimension (N) On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are the errors in the estimates of the corresponding elements in W. On output, these errors are refined. WORK WORK is REAL array, dimension (2*N) Workspace. IWORK IWORK is INTEGER array, dimension (2*N) Workspace. PIVMIN PIVMIN is REAL The minimum pivot in the Sturm sequence for T. SPDIAM SPDIAM is REAL The spectral diameter of T. INFO INFO is INTEGER Error flag. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: September 2012 Contributors: Beresford Parlett, University of California, Berkeley, USA Jim Demmel, University of California, Berkeley, USA Inderjit Dhillon, University of Texas, Austin, USA Osni Marques, LBNL/NERSC, USA Christof Voemel, University of California, Berkeley, USA Definition at line 167 of file slarrj.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 slarrj.f(3)
All times are GMT -4. The time now is 04:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy