Page 1 of 1

ps aux ¦ grep over ssh

Posted: Tue Aug 14, 2012 6:10 pm
by Hiro
I am trying to run the command

Code: Select all

ps aux ¦ grep mutt
over ssh from a Windows box running Putty to my Pi but it doesn't work, i get garbage option error.
To try to tie down the problem i did the following
Mint Linux box to Pi, works.
Win XP PC to Pi, doesn't work.
Win XP laptop to Pi, doesn't work.
Phoned a friend, his Win 7 laptop to Pi, doesn't work. All garbage option errors on the Win machines.
All Windows machines are using Putty V 0.62. It clearly seems to be a Windows or Putty issue as it's fine from the Mint box. As both myself and my friend are experiencing the same issue i expected to find the answer with a quick google but couldn't find any mention of it at all.
I had a look through the options in Putty and tried just about every combination of keyboard options but still no joy.
Does anyone else have this problem and if so how do you get around it?

Re: ps aux ¦ grep over ssh

Posted: Tue Aug 14, 2012 6:52 pm
by Joe Schmoe
1) It is almost certainly some kind of keyboard configuration problem - either on the Pi side or the Windows (PUtty) side. I vaguely remember someone reporting something similar, where they hit 1 key and the Pi interpreted it as 2 keystrokes - with one of them being a "-" (which might explain the error message about the bad option string). BTW, it would be useful to know the exact error message text that your received.

2) What about using PUtty to some other Linux host? Does that work?

Re: ps aux ¦ grep over ssh

Posted: Tue Aug 14, 2012 7:45 pm
by Hiro
The message is exactly as stated in OP "garbage option" and then the usual usage message.
I forgot to mention that i get the same trying it on the Mint box from either Windows machine. That was pretty much how i was able to figure it was a Windows or Putty problem.
Also should have mentioned that there is no problem with

Code: Select all

 ps aux
which works like it should.

Re: ps aux ¦ grep over ssh

Posted: Tue Aug 14, 2012 7:57 pm
by jojopi
Hiro wrote:ps aux ¦ grep mutt
You are typing the wrong character; it should be "ps aux | grep mutt". That is ASCII U+007C | VERTICAL LINE, not non-ASCII U+00A6 ¦ BROKEN BAR.

The issue is almost certainly on your client, not the Pi. Note that UK keyboards (and possibly some others) traditionally have the keycap glyphs printed the opposite way to the modern appearance. The key to the left of Z is |, and the key to the left of 1 is ¦, even if the labels say otherwise.

Re: ps aux ¦ grep over ssh

Posted: Tue Aug 14, 2012 8:21 pm
by Hiro
Ah, now that works, i've always on all my Linux systems used the key to the left of the 1 key for the pipe and it does work, i've just tested to be sure on both the Pi and my Mint box and both keys produce the vertical bar not the broken bar from both keys. So i've been wrong for ages but luckily it's always worked.
However Windows produces the broken bar from the key near the 1 and the vertical from the one next to z. I have four keyboards here and 2 are correctly labeled whilst the other 2 show the symbols transposed.
No wonder i'm confused. Anyway problem solved but just out of interest where on the keyboard would i go to produce a ¦ on a keyboard of a computer running Linux? I don't need it but am curious. Does Linux even use it?
Thanks for the help, Hiro.