The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-13-2007
rsolap rsolap is offline
Registered User
 

Join Date: Aug 2007
Posts: 1
Exclamation splitting a record and adding a record to a file

Hi,

I am new to UNIX scripting and woiuld appreicate your help...

Input file contains only one (but long) record:

aaaaabbbbbcccccddddd.....

Desired file:

NEW RECORD #new record (hardcoded) added as first record - its length is irrelevant#
aaaaa
bbbbb
ccccc
ddddd
...
...

a,b,c,d.... could be anything, including spaces.

I 'feel' awk should be the best tool, but my lack of knowledge...

thank you very much.
Reply With Quote
Remove advertisements
!!
!! Forum Sponsor