The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
extract field of characters after a specific pattern - using UNIX shell script jansat HP-UX 2 05-28-2008 01:08 AM
How to extract field from variable more efective pp56825 Shell Programming and Scripting 11 01-19-2008 10:34 AM
How to extract elements in a field using a number ahjiefreak Shell Programming and Scripting 17 12-13-2007 04:13 AM
Extract Part of string from 3rd field $3 using AWK stakuri Shell Programming and Scripting 4 10-10-2007 01:28 PM
Trying to extract a field from /etc/passwd file.. xBuRnTx UNIX for Dummies Questions & Answers 2 10-05-2005 03:45 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-22-2008
jansat jansat is offline
Registered User
  
 

Join Date: May 2008
Posts: 4
need to extract field of characters in a line

Hello,

Below is my input file's content ( in HP-UX platform ):

ABCD120672-B21 1
ABCD142257-002 1
ABCD142257-003 1
ABCD142257-006 1

From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could you please let me know the shell script that I have to use?

Thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0