Bug 5126

Summary: awk doesn't handle C-escapes in argument to -F
Product: Busybox Reporter: dubiousjim
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

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