You are not logged in.

#1 2008-12-01 18:00:48

initbox
Member
Registered: 2008-09-27
Posts: 172

[Solved]Strange piping issue..

Sometimes when I try piping commands, I simply get a "command not found" even though the commands are correct for sure.

The commands will work when I remove the space after the pipe... It's really annoying and it has happened to me on different distributions, so it's not just Arch. I managed to get a fantastic example just now and this time I thought to myself "This time, I'll HAVE to figure this out!!!"

So, see this example below. I even got an error message, which I think hasn't happened before.

~$ man bash | wc -l
4892
~$ man mplayer | wc -l
bash:  wc: command not found
Error executing formatting or display command.
System command (cd "/usr/share/man" && (echo ".pl 11i"; /bin/cat '/usr/share/man/man1/mplayer.1') | /usr/bin/gtbl | /usr/bin/nroff  -mandoc -c | /bin/less -is) exited with status 36096.
No manual entry for mplayer
~$ man mplayer |wc -l
8086

So, what's this? It isn't a simple one-time issue, if I try to repeat the command it fails every time but when I remove the space it works. I don't know if the error message is related to this issue though, because this is the first time it has shown itself, even though I've stumbled across this issue many times.

Last edited by initbox (2008-12-01 20:10:01)

Offline

#2 2008-12-01 18:13:06

string
Member
Registered: 2008-11-03
Posts: 286

Re: [Solved]Strange piping issue..

Here's one shot in the dark: what does `printenv` say?

Offline

#3 2008-12-01 19:19:25

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Strange piping issue..

XDG_DATA_HOME=/home/nk/.local/share
SHELL=/bin/bash
TERM=screen
HISTSIZE=1000
QT_XFT=true
HUSHLOGIN=FALSE
WINDOWID=8388615
QTDIR=/opt/qt
LC_ALL=en_US.UTF-8
USER=nk
TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\
        :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
        :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
        :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
        :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
        :li#85:co#279:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
        :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
        :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
        :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
        :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
        :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
        :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
        :vb=\Eg:G0:as=\E(0:ae=\E(B:\
        :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
        :po=\E[5i:pf=\E[4i:k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:\
        :k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
        :k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:F3=\E[25~:\
        :F4=\E[26~:F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:\
        :F9=\E[33~:FA=\E[34~:kb=:K1=\EOw:K2=\EOu:K3=\EOy:\
        :K4=\EOq:K5=\EOs:kB=\E[Z:kE=\E[8\^:*4=\E[3$:*7=\E[8$:\
        :#2=\E[7$:#3=\E2$:#4=\E[d:%c=\E[6$:%e=\E[5$:%i=\E[c:\
        :kh=\E[1~:@1=\E[1~:kH=\E[4~:@7=\E[4~:kN=\E[6~:kP=\E[5~:\
        :kI=\E[2~:kD=\E[3~:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:km:
OOO_FORCE_DESKTOP=gnome
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins:/opt/mozilla/lib/plugins
XDG_CONFIG_DIRS=/etc/xdg:/opt/kde/etc/xdg
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
MAIL=/var/spool/mail/nk
STY=2868.pts-0.hostname
LC_COLLATE=C
PWD=/home/nk
INPUTRC=/etc/inputrc
EDITOR=vim
LANG=en_US.utf8
KDEDIRS=/usr:/opt/kde
PS3=> 
HISTCONTROL=ignoredups
HOME=/home/nk
PS4=+ 
SHLVL=5
COLORFGBG=15;0
XDG_CONFIG_HOME=/home/nk/.config
TERMINFO=/usr/share/terminfo
XDG_CACHE_HOME=/home/nk/.cache
LOGNAME=nk
LESS=-R
WINDOW=5
XDG_DATA_DIRS=/usr/share:/usr/local/share:/opt/kde/share
PKG_CONFIG_PATH=:/opt/kde/lib/pkgconfig:/opt/qt/lib/pkgconfig
WINDOWPATH=7
DISPLAY=:0
G_BROKEN_FILENAMES=1
XAUTHORITY=/home/nk/.Xauthority
COLORTERM=rxvt
_=/usr/bin/printenv

Here you go. But I don't think it's really environment specific, since I've had this occur in Ubuntu with full Gnome and now I'm using urxvt with screen. I think I've actually seen this happen in actual shells. I've always had bash though. Oh well..

Last edited by initbox (2008-12-01 19:20:19)

Offline

#4 2008-12-01 19:22:28

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [Solved]Strange piping issue..

Maybe an alias? Can you give the output of alias?

Edit: Or a function?

Last edited by Procyon (2008-12-01 19:22:45)

Offline

#5 2008-12-01 19:42:02

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Strange piping issue..

alias kaffeine='/opt/kde/bin/kaffeine'
alias virtualbox='VirtualBox'

And no I don't customize that much..

Offline

#6 2008-12-01 19:58:00

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [Solved]Strange piping issue..

Could it be because you type Shift+Space and a special character is added? (That doesn't happen for me, but maybe it's something KDE?)

Offline

#7 2008-12-01 19:59:14

barjo
Member
Registered: 2006-02-20
Posts: 33

Re: [Solved]Strange piping issue..

non breakable space before wc

You type | using Alt Gr right? Alt Gr+space => non breakable space with some keyboard config.
$ (non breakable space)wc
bash:  wc: command not found

Offline

#8 2008-12-01 20:01:38

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Strange piping issue..

barjo wrote:

non breakable space before wc

You type | using Alt Gr right? Alt Gr+space => non breakable space with some keyboard config.
$ (non breakable space)wc
bash:  wc: command not found

Hmm. Yes. What is this non-breakable space? I've never heard of that one before.... O_o

I do type my pipes with altgr + < since it's the only way, I think, with the Fin/Swe-layout. But I don't type spaces after the pipe with altgr down.

Last edited by initbox (2008-12-01 20:03:49)

Offline

#9 2008-12-01 20:04:41

barjo
Member
Registered: 2006-02-20
Posts: 33

Re: [Solved]Strange piping issue..

It's a space that is not a word separator. For more info, see your favorite search engine wink

edit: for exemple in french we quote like this « This is a quote »
Spaces just after « and just before » should be non breakable, the line shouldn't break there.

Last edited by barjo (2008-12-01 20:12:12)

Offline

#10 2008-12-01 20:06:15

barjo
Member
Registered: 2006-02-20
Posts: 33

Re: [Solved]Strange piping issue..

> But I don't type spaces after the pipe with altgr down.

Well, it's just mistyping.

Offline

#11 2008-12-01 20:09:25

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: [Solved]Strange piping issue..

Well, I see what you mean. That might be it indeed. I'll post again if it happens again and it isn't this..

Offline

Board footer

Powered by FluxBB