[Bug 1793668] [NEW] xargs gives "[: err: unexpected operator" on Ubuntu but not Centos

Launchpad Bug Tracker 1793668 at bugs.launchpad.net
Fri Sep 21 13:04:59 UTC 2018


You have been subscribed to a public bug:

cd /tmp
rm -Rf tst err
echo 'if [ "$1" == "" ]; then echo "empty"; else cat $1; fi' > tst
chmod +x tst
echo "a" > err
ls err | xargs ./tst # ./tst: 1: [: err: unexpected operator
./tst err # works fine, outputs 'a'

On Ubuntu the error will be shown, on Centos it won't. The error looks
to be incorrect.

$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
$ xargs --version
xargs (GNU findutils) 4.7.0-git
Copyright (C) 2017 Free Software Foundation, Inc.

** Affects: findutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment
-- 
xargs gives "[: err: unexpected operator" on Ubuntu but not Centos
https://bugs.launchpad.net/bugs/1793668
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to findutils in Ubuntu.



More information about the foundations-bugs mailing list