Field Separator larger than one character 
Author Message
 Field Separator larger than one character

Example line:
1john2john3john4

How would you get "john" be the field separator so $1 = 1, $2=2, ...?

I have tried BEGIN FS="john" with strange results, $2=ohn2.

Any info would be great!




Thu, 23 Jan 2003 03:00:00 GMT  
 Field Separator larger than one character

% Example line:
% 1john2john3john4
%
% How would you get "john" be the field separator so $1 = 1, $2=2, ...?
%
% I have tried BEGIN FS="john" with strange results, $2=ohn2.

This implies you're using `old' (pre-1989) awk. The most common reason for
using old awk is that you're on Solaris and typing `awk'. Either set your
path so that /usr/xpg4/bin comes first in your path, or use nawk, and
it should work the way you want.

--

Patrick TJ McPhee
East York  Canada



Thu, 23 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Dealing with commas as a field separator AND possibly within a field

2. Memo field larger than 255 characters

3. Clipper 5.2e crashes when last field of DBF file has one character name

4. line separator character (text widget)

5. Hexadecimal Field Separator

6. Multiple field separators for paranthesis not working

7. multiple field separators in AWK

8. Field Separator

9. Field Separator not working

10. Quoted field separators

11. backslash as field separator

12. field separator

 

 
Powered by phpBB® Forum Software