Skip to main content
Update following the question edit.
Source Link
Stephen Kitt
  • 481.3k
  • 60
  • 1.2k
  • 1.4k

Note the double space in bash's error message before "grep": that probably means you've typed an unbreakable space (AltGr+space), which can happen quite easily if your keyboard requires AltGr to produce the pipe symbol.

Try dropping the spaces around the pipe symbol:

ps aux|grep xscreensaver

In your updated examples:

[root@Hostname ~]# ps aux |  grep xscreensaver
bash:  : command not found...

bash is trying to run the "unbreakable space" command, which doesn't exist; hence the error message, "unbreakable space": command not found...

[root@Hostname ~]# ps aux | grep xscreensaver
bash:  grep: command not found...

bash is trying to run the command whose name is "grep" preceded by an unbreakable space, which doesn't exist either; hence the error message with two apparent spaces between "bash:" and "grep".

Note the double space in bash's error message before "grep": that probably means you've typed an unbreakable space (AltGr+space), which can happen quite easily if your keyboard requires AltGr to produce the pipe symbol.

Try dropping the spaces around the pipe symbol:

ps aux|grep xscreensaver

Note the double space in bash's error message before "grep": that probably means you've typed an unbreakable space (AltGr+space), which can happen quite easily if your keyboard requires AltGr to produce the pipe symbol.

Try dropping the spaces around the pipe symbol:

ps aux|grep xscreensaver

In your updated examples:

[root@Hostname ~]# ps aux |  grep xscreensaver
bash:  : command not found...

bash is trying to run the "unbreakable space" command, which doesn't exist; hence the error message, "unbreakable space": command not found...

[root@Hostname ~]# ps aux | grep xscreensaver
bash:  grep: command not found...

bash is trying to run the command whose name is "grep" preceded by an unbreakable space, which doesn't exist either; hence the error message with two apparent spaces between "bash:" and "grep".

Source Link
Stephen Kitt
  • 481.3k
  • 60
  • 1.2k
  • 1.4k

Note the double space in bash's error message before "grep": that probably means you've typed an unbreakable space (AltGr+space), which can happen quite easily if your keyboard requires AltGr to produce the pipe symbol.

Try dropping the spaces around the pipe symbol:

ps aux|grep xscreensaver