Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to see full manual for commands in terminal for Mac OS?

I am completely new to Mac OS and I am trying to figure out how to display in terminal all flags for echo command. When I do man echo it only shows me one flag which is -n and I am pretty sure there are many more.
I’ve googled it but found nothing.

Thank you beforehand!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

For shell builtins such as echo, the man page does not offer an accurate description, since it describes the binary (usually found in /bin), not the builtin.

For help on the built-in commands in Bash, use

help echo

For instance, on my version of macOS this shows me:

echo: echo [-neE] [arg ...]
    Write arguments to the standard output.

    Display the ARGs, separated by a single space character and followed by a
    newline, on the standard output.

    Options:
      -n  do not append a newline
      -e  enable interpretation of the following backslash escapes
      -E  explicitly suppress interpretation of backslash escapes
…

In zsh, the closest equivalent is man zshbuiltins, which shows the documentation for all built-in commands. To find a given command in it, type / echo and hit Return. Note that there are multiple spaces between / and echo! This isn’t necessary, but it often filters out false hits.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading