LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2014, 06:05 PM   #1
theAdmiral
Member
 
Registered: Oct 2008
Location: Boise, Idaho
Distribution: Debian GNU/Linux (Jessie) + KDE
Posts: 168

Rep: Reputation: 4
Probably an important detail to know in the MAN pages.


Something that I have had a question about for awhile, but just now "getting around" to asking:

In the following quotation block, there is some syntax that is mysterious to me. In order to better understand how to read the man pages, would somebody answer for me the following question(s):

Quote:
OPTIONS
Non argument options that are duplicated either on the command line, in $MANOPT, or both, are not harmful. For
options that require an argument, each duplication will override the previous argument value.

General options
-C file, --config-file=file
Use this user configuration file rather than the default of ~/.manpath.
This quotation was taken from the page for the command

Code:
$man man
My questions have to do with the placement of the equals sign following
Quote:
--config-file
as well as what the second usage of the word "file" means in that line. Also, I have seen other pages where the equals sign is not in bold font--what does that mean? I am getting the impression based on my readings of the man pages over the years that the line
Quote:
-C file, --config-file=file
implies more than one concept. Of course, I could be wrong. But, to the point, my questions are: (1) Can the line be read more than one way? and (2) How do I read that line? In other words, what is the sum of information that I can get from that line? And what does a non-bold equals sign mean, and what does a bold equals sign mean?

Thank you much, in advance for your help.

Last edited by theAdmiral; 05-13-2014 at 06:06 PM.
 
Old 05-13-2014, 07:01 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Actually, rather straight forward...

Both are the same thing. The -C is a short form for the equivalent --config-file. Thus the "file" reference is the same.

Using the long form is good for use in scripts that may embed the man command for its self documenting capability, but it is a pain to type on a command line.

This is similar to the "-d, --debug" that follows. -d is the short form, --debug the long.

Now there are some options that don't have a short form, (like --warnings), but these are very rarely used options where "-d" is used for finding out why something didn't display as expected (usually used by documentation developers).

In some cases, the short form is included to provide for backward compatibility - the option may have some extended capabilities (such as the -w, --where, --location).

In other cases the option is totally new - such as the "-e sub-extension, --extension=sub-extension" which can be useful on the command line, but because the structure is already provided, a long form also included.

Forgot one other thing.

There are sometimes multiple short form options and one long form option (here the example is the "-S list, -s list, --sections=list". This provides for compatibility with multiple systems - BSD/AIX/Solaris.

GNU developed applications tend to always have the long form available with short form. But some applications come from other places and have not been converted/translated as their source would have to be updated (and possibly the project providing them just doesn't feel like adding the code as that would also affect their runtime library too).

Last edited by jpollard; 05-13-2014 at 07:07 PM.
 
Old 05-13-2014, 07:06 PM   #3
theAdmiral
Member
 
Registered: Oct 2008
Location: Boise, Idaho
Distribution: Debian GNU/Linux (Jessie) + KDE
Posts: 168

Original Poster
Rep: Reputation: 4
When using the long form, must I type the equals sign when, for example, also typing a filename? Also, what is the difference between a bold and a non-bold equals sign?

Again, thank you.
 
Old 05-14-2014, 02:01 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by theAdmiral View Post
When using the long form, must I type the equals sign when, for example, also typing a filename? Also, what is the difference between a bold and a non-bold equals sign?

Again, thank you.
The "=" is part of the syntax.

As for the bolding/non-bolding I think that is an error in the man page as the bolding is not relevant to the command. It can even be an error in the translation to the terminal type as the original purpose of the man page was to be able to produce a fancy printed documentation (where things are italicized). The bolding is used to substitute for the lack of capability in the terminal for handling multiple fonts.

This last goes way back (historically) into the text documenting that UNIX had as a foundation. The original use for UNIX was a typesetting and text formatting system for Bell Laboratory secretaries. It was based on a macro language for generating escape sequences for typesetting. The original "man" command itself was a shell script that ran something like "pic | eqn | nroff -man" where "pic" was a preprocessing language for generating figures and diagrams (PICture), "eqn" was another for generating equations, and the "man" was a specific set of macros for man page formatting. The combination of various tools made the availability of quite elaborate documentation for both online use, and creating reference books.

http://en.wikipedia.org/wiki/Troff

Current implementations are now available where groff is the common one. groff = GNU roff, and it tends to include all of the documentation tools from UNIX, including table of contents, subscripting/superscripting, diagrams, tables, and cross reference indexes.

This was the first general text processing tool kit included as a basic part of an operating system.

Unfortunately, with the rise of the GUI a lot of the documentation tradition of UNIX has been killed - partly due to Windows not including tools, and partly due to laziness. Some of the GNU project produce documentation in "info" format that has the same goals, and that includes the ability to create man pages, but with some searchability. Again, creating the original documents has fallen by the wayside, so man pages now have a tendency to be missing, or even incomplete.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] man pages - man command phillyfilly Linux - Newbie 4 02-10-2014 06:41 AM
C++ man pages Guest1234 Linux - Newbie 2 06-29-2008 10:12 AM
LQ man pages simcox1 LQ Suggestions & Feedback 1 08-06-2006 10:25 AM
C man pages sono2 Programming 4 09-12-2005 02:24 AM
man pages? synaptical Debian 4 06-13-2005 09:16 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration