Bug 1259195

Summary: bash: [: |/usr/bin/lesspipe.sh : opérateur binaire attendu
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: lessAssignee: Viktor Jancik <vjancik>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hhorak, jmlich83, kdudka, ovasik, pknirsch, vjancik, yaneti
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-02 11:21:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicolas Mailhot 2015-09-02 07:36:43 UTC
Description of problem:
bash: [: |/usr/bin/lesspipe.sh : opérateur binaire attendu

when starting bash

caused by something in /etc/bashrc (removing /etc/bashrc sourcing in ~/.bashrc removes the warning)

Version-Release number of selected component (if applicable):

setup-2.9.8-2.fc23.noarch
bash-4.3.42-1.fc24.x86_64

Comment 1 Kamil Dudka 2015-09-02 11:16:26 UTC
This seems to be caused by missing quotes in /etc/profile.d/less.sh which was changed recently:

http://pkgs.fedoraproject.org/cgit/less.git/commit/?id=b539f87a

The following patch will fix it:

--- a/less.sh
+++ b/less.sh
@@ -1,4 +1,4 @@
 # less initialization script (sh)
-if [ -x /usr/bin/lesspipe.sh ] && [ -z $LESSOPEN ]; then
+if [ -x /usr/bin/lesspipe.sh ] && [ -z "$LESSOPEN" ]; then
     export LESSOPEN="|/usr/bin/lesspipe.sh %s"
 fi

Comment 2 Yanko Kaneti 2015-09-02 11:21:04 UTC

*** This bug has been marked as a duplicate of bug 1258808 ***