reallyawkward
Technical User
Hi,
I am reading in a file which consists of fixed length records with white spaces and tabs separating fields. Some fields have white spaces with them.
Here are 2 sample records:[tt]
----+----|----+----|----+----|----+----|----+----|----+----|----+---
John Smith 5551111212 TECHNICAL LEAD DATABASE
MICHAEL ANDERSON-KLEIN 5555678765 ADMIN ASSISTANT
[/tt]
I am currently reading the records as follows:
{
FIRST=substr($0,1,12)
LAST=substr($0,13,18)
PHONE=substr($0,31,10)
TITLE=substr($0,41,22)
}
How can I strip the trailing spaces from each field?
Thanks in advance.
Really Awkward
;-)
I am reading in a file which consists of fixed length records with white spaces and tabs separating fields. Some fields have white spaces with them.
Here are 2 sample records:[tt]
----+----|----+----|----+----|----+----|----+----|----+----|----+---
John Smith 5551111212 TECHNICAL LEAD DATABASE
MICHAEL ANDERSON-KLEIN 5555678765 ADMIN ASSISTANT
[/tt]
I am currently reading the records as follows:
{
FIRST=substr($0,1,12)
LAST=substr($0,13,18)
PHONE=substr($0,31,10)
TITLE=substr($0,41,22)
}
How can I strip the trailing spaces from each field?
Thanks in advance.
Really Awkward
;-)