Results 1 to 7 of 7
This has been my very old curiosity since beginning with Linux. Why so man documentation using "`" as the starting quote instead of just use regular " or '. Can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-13-2011 #1
Why ``double quote"" & `single quote'
This has been my very old curiosity since beginning with Linux.
Why so man documentation using "`" as the starting quote instead of just use regular " or '.
Can someone offer me some hint?
- 10-13-2011 #2
- Join Date
- Dec 2009
It's because they have different meanings:
' and " is quite equal ... it will just differ when you use variables inside the quotes.
' won't try to find a var-name in the text
" var-names will be interpreted
echo "Hello $var1 \n"
Will show: Hello World
\n may be interpreted as new line
if you write:
echo 'Hello $var1 \n'
It will show: Hello $var1 \n
The 3rd quote you mentioned is used very different ...
I know you can quote a bash command within ` but I can't remember the meaning of it ... never used it.
It is also used in SQL to quote names of database, tables or fields.
- 10-14-2011 #3
- Join Date
- Oct 2007
- Tucson AZ
Are you referring to a backtick, the lower case symbol on the key to the left of the number one on a standard English keyboard?
If so, take a look at the link below:
Unix / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ]
If that's not it, ignore.
- 10-14-2011 #4
- Join Date
- Aug 2007
Yes, long story short, bash will:
- execute the given command
- put its output to the place of the backtick quotes.
For example: ls `echo $HOME` will:
- execute 'echo $HOME' - which typically is set to something like /home/username, in my case /home/zlatko
- put it in place of quotes, so the whole line becomes "ls /home/username"
- 10-14-2011 #5
- Join Date
- Apr 2006
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
I interpret the OP's question as referring to the single left quote in documentation as opposed to in shell scripting.
If so, I think the answer lies in one of the first applications of Unix - in the 1970s. It was to drive a typesetting machine to produce publication-quality documents. Hence the "screen" view of "roff" pages should resemble the final product. That was not easy on interactive devices available at the time, so some approximations needed to be accepted.
Professional documentation used left curly quotes, but those didn't exist in the available character set, so the left single quote, in single and double forms, was used.
You may be able to find out more details by looking for and through items like Documentor's Workbench, history of Unix, etc.
At the time of the placement of the order for the PDP-11, it had seemed natural, or perhaps expedient, to promise a system dedicated to word processing. During the protracted arrival of the hardware, the increasing usefulness of PDP-7 Unix made it appropriate to justify creating PDP-11 Unix as a development tool, to be used in writing the more special-purpose system. By the spring of 1971, it was generally agreed that no one had the slightest interest in scrapping Unix. Therefore, we transliterated the roff text formatter into PDP-11 assembler language, starting from the PDP-7 version that had been transliterated from McIlroy's BCPL version on Multics, which had in turn been inspired by J. Saltzer's runoff program on CTSS. In early summer, editor and formatter in hand, we felt prepared to fulfill our charter by offering to supply a text-processing service to the Patent department for preparing patent applications. At the time, they were evaluating a commercial system for this purpose; the main advantages we offered (besides the dubious one of taking part in an in-house experiment) were two in number: first, we supported Teletype's model 37 terminals, which, with an extended type-box, could print most of the math symbols they required; second, we quickly endowed roff with the ability to produce line-numbered pages, which the Patent Office required and which the other system could not handle.
Early Unix history and evolutionWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 10-21-2011 #6
Sorry for not being clear enough in my original post, my curiosity limits in the domain of documentations.
Thank you every one for your sharing, especially for drl as always hits my question perfectly.
- 10-22-2011 #7
You may also be interested in TeX, which is a typesetting language used for producing very nice PDFs, and which is used for lots of mathematical and computer science papers, and which was originally released in 1978.
In TeX, if you want to quote something, you need to tell it the difference between an opening quote and an ending quote so that it can curl them correctly in the final output. So you see the `a' pair and ``a'' pair a lot.