-1

Consider the following command, which I am trying to execute on Red Hat Enterprise Linux 8 system.

nmcli con add help | less

Some of the help pages for specific COMMANDs are quite lengthy and piping to less is not working as I would expect. Normally a command like 'man nmcli | less' provides the first page and you have to use navigation to get to the bottom. In this case it shows me the last page, and I can't page up. Attempting to do so results in a page full of blank lines. I'd like to see all of the help documentation for that particular combination of the object and add command. For some reason the help option for the nmcli command is not working well with the less utility. If I try to use '>' to redirect to a file I end up with a blank file.

shawn1874
  • 1,288
  • 1
  • 10
  • 26
  • Please note that Stack Overflow is for programming questions and not general computing issues. Please review [What topics can I ask here?](https://stackoverflow.com/help/on-topic) for more details. Question may be appropriate for [Super User](http://superuser.com) or [Unix & Linux](http://unix.stackexchange.com) but do check their help before posting. – kaylum Jul 04 '20 at 02:22
  • 1
    Linux shell programs are common tools used by programmers so I disagree with your assertion. nmcli is a shell program that could be used wtihin bash scripts, and certainly isn't something that the average computer user would be using to configure network settings via a script. – shawn1874 Jul 04 '20 at 02:37

1 Answers1

0

It looks nmcli help is writing on stderr instead of stdout.

The following works on CentOS 7:

$ nmcli con add help 2>&1 | less
pifor
  • 7,419
  • 2
  • 8
  • 16