Bug 5126 - awk doesn't handle C-escapes in argument to -F
Summary: awk doesn't handle C-escapes in argument to -F
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.19.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-19 11:57 UTC by dubiousjim
Modified: 2012-06-22 16:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dubiousjim 2012-04-19 11:57:45 UTC
BusyBox 1.19.3, built against uClibc 0.9.32, on i686 Linux

This works properly:
$ printf 'abc!def' | awk -v FS='\x21' '{print $1}'
abc

This should work the same way, but doesn't:
$ printf 'abc!def' | awk -F'\x21' '{print $1}'
abc!def

The same issue affects `awk -F'\t' ...` and so on.
Comment 1 Denys Vlasenko 2012-06-22 16:41:57 UTC
Fixed in git:

commit ea664dde87d8e52df7d4003d988352a66562a945
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Fri Jun 22 18:41:01 2012 +0200

    awk: make -F STR interpret escape sequences