Incorrect handling of "^[^ ]+ " in gsub

Bug #1048135 reported by Malaise
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mawk (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

echo "30 29 27 26 23" | mawk '{gsub ("^[^ ]+ ", ""); print $0}'
leads to print "23" instead of "29 27 26 23"
According to the man the leading "^" matches the front of a string, but it seems to be ignored.

This works OK with gawk.
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
Package: mawk 1.3.3-15ubuntu2
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-42.96-generic 2.6.32.59+drm33.24
Tags: lucid
Uname: Linux 2.6.32-42-generic i686
UserGroups:
---
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
Package: mawk 1.3.3-17
PackageArchitecture: i386
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic-pae 3.2.27
Tags: precise
Uname: Linux 3.2.0-30-generic-pae i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Logan Rosen (logan) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 1048135
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in mawk (Ubuntu):
status: New → Incomplete
Revision history for this message
Malaise (malaise) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Malaise (malaise) wrote :

apport information

tags: added: precise
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mawk (Ubuntu) because there has been no activity for 60 days.]

Changed in mawk (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.