Extract part of file

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Extract part of file
# 15  
Old 08-23-2013
@Jotne, Thanks for noting but my solution is not generic and applies to the input data posted in this thread. I hope we both have given enough directions now Smilie
This User Gave Thanks to krishmaths For This Post:
# 16  
Old 08-23-2013
Thanks guys.

The solution worked perfectlySmilie
You guys rockSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract a part of variable/line content in a file

I have a variable and assigned the following values ***XYZ_201519_20150929140642_20150929140644_211_0_0_211 I need to read this variable from backward and stop read when I get first underscore (_) In this scenario I should get 211 Thanks Kris (3 Replies)
Discussion started by: mkris
3 Replies

2. Programming

Extract part of an archive to a different file

I need to save part of a file to a different one, start and end offset bytes are provided by two counters in long format. If the difference is big, how should I do it to prevent buffer overflow in java? (7 Replies)
Discussion started by: Tribe
7 Replies

3. UNIX for Advanced & Expert Users

Need help to extract part of the string

Hi, I have a string with name as 20140412-s1-Potopolive_promos_20140412. So I want to extract only Potopolive string. Could you please help me the command. O/p : Potopolive Thx in advance (5 Replies)
Discussion started by: lkeswar
5 Replies

4. Shell Programming and Scripting

Extract the part of sequences from a file

Discussion started by: rahim42
8 Replies

5. Shell Programming and Scripting

Extract part of a string

I have a file with 100s of lines of text. I want to perform an extraction of this line: Info bpzs(pid=2652) using 1000 bits I have not been able to extract it. Should I try expr match or is there another method? This line has data both in front of and in back of it. I do not have grep -o... (5 Replies)
Discussion started by: newbie2010
5 Replies

6. Shell Programming and Scripting

how to extract a certain part of a line

Hi friends, I want to select and use the certain part of a line. For example I have the following line home/1245/hgdf/acsdf/myhome/afolder/H2O/endfile how can I extract the part " /myhome/afolder/H2O/endfile " thanks (6 Replies)
Discussion started by: rpf
6 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 last part of string.

Hi, I have a string like this BUNDLE=/home/bob/flx/user.bun how to extract only the the last part ie, only user.bun (2 Replies)
Discussion started by: vprasads
2 Replies

9. Shell Programming and Scripting

How to extract certain part of log file?

Hi there, I'm having some problem with UNIX scripting (ksh), perhaps somebody can help me out? For example: ------------ Sample content of my log file (text file): -------------------------------------- File1: .... info_1 ... info_2 ... info_3 ... File2: .... info_1 ... info_2 ...... (10 Replies)
Discussion started by: superHonda123
10 Replies

10. UNIX for Dummies Questions & Answers

Extract a part of file name

Hi, I want to extract a part of filename and pass it as a parameter to one of the scripts. Could someone help. File name:- NLL_NAM_XXXXX.XXXXXXX_1_1.txt. Here i have to extract only XXXXX.XXXXXXX and the position will be constant. that means that i have to extract some n characters from... (6 Replies)
Discussion started by: dnat
6 Replies
Login or Register to Ask a Question