The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting the line in multiple lines dd_sh Shell Programming and Scripting 3 03-31-2008 10:54 AM
Splitting a line spindoctor UNIX for Dummies Questions & Answers 16 07-10-2007 11:29 AM
Line Splitting evoGage UNIX for Dummies Questions & Answers 7 11-30-2005 05:59 PM
Splitting a single line into multiple lines thanuman Shell Programming and Scripting 4 02-23-2005 12:56 AM
splitting the files sounder123 Shell Programming and Scripting 1 06-04-2004 04:03 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-12-2001
Registered User
 

Join Date: Mar 2001
Posts: 2
Angry



9600012301F TF02FT T03FFTF04TF 05T FF06TTTT

I have to split this line up into this

96000123
01F TF
02FT T
03FFTF
04TF
05T FF
06TTTT

Can anyone please Help??
Forum Sponsor
  #2 (permalink)  
Old 03-12-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 905
#!/usr/local/bin/perl

while (<>) {
print substr($_,0,8) . "\n";
print substr($_,8,6) . "\n";
print substr($_,14,6) . "\n";
print substr($_,20,6) . "\n";
print substr($_,26,5) . "\n";
print substr($_,31,6) . "\n";
print substr($_,37,6) . "\n";
}

Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0