- https://nullprogram.com/blog/2020/08/01/ helps a lot with understanding the conventions used by many Unix and Unix-inspired tools (like those mentioned here).
- Other resources: 1, 2, 3.
- Capital N = default is "No". If you just press Enter without choosing/typing, it will be interpreted as No. Same with Y.
- Equal capitalization "Y/N" means you have to choose.
2. In help, arguments in square brackets are optional, pipe=alternatives:
Code: Select all
pdftohtml [options] <PDF-file> <html-dir>
means options can be omitted, but you have to provide file and dir.
means:Code: Select all
netcfg [-v] [-winpe] [-l <full-path-to-component-INF>] -c <p|s|c>
-v, -winpe are optional.
-l is optional, but if you use it you must provide the path.
-c is mandatory and you have to provide an argument for it by picking one of p or s or c.
can be entered as:
Code: Select all
wget.exe --http-keep-alive <URL>
wget.exe --http-k <URL> or wget.exe --http-kee <URL>, etc.
If you try --http only, it will throw an error because there are multiple switches beginning with --http, for example, --http-password.
If you have a file or a string that begins with a hyphen-minus (-), a CLI tool might think that you are trying to use a switch.
For example, you may want to search a text file for the string (-h). If you enter type myfile.txt|grep -h, grep might think you are trying to see the help for grep itself.
To avoid this, you can:
- put the string in quotes ("-h"), but that doesn't always work or can be problematic.
- use -- (if the tool supports this) to indicate "No more switches. Whatever comes next is a string parameter":
Code: Select all
type myfile.txt|grep -- -h
7. Some tools allow you to reverse a yes/no option by inserting no-.If a tool opens but only shows a blinking cursor at the beginning of the next line, and the purpose of this tool is to act upon text in some way (analyze, convert, etc), try the following steps:This will tell the tool that you finished the input text and it should process it.
- entering some text, in one or more lines like you would in Notepad.
- Press Ctrl+Z.
- Press Enter.
This is useful for allowing free-form, multi-line entering and editing of text in the terminal first then running the tool (as opposed to redirecting the text as standard input).
For example, wget --quiet becomes wget --no-quiet.
Or the opposite, wget --verbose becomes wget --no-verbose.
In tools that behave like that, this should apply to any long Boolean (yes/no) option. Long here means the option begins with two dashes (--quiet), not an abbreviated form (-q). The actual character length of the long option shouldn't matter.
Another example,
--default-browser-check is disabled like this: --no-default-browser-check.