Reserved command line tokens

When building an application with the CLI, it is useful to avoid using tokens that are commonly used for shell functions.

For example, it is |

used to output one application to the pipeline to input the next.

Please provide a complete list of tokens that need to be escaped in order to use them?

At a minimum / summary, for each token, please provide the appropriate OS / shell (s), a simple explanation of what the token does, and any evacuation methods.

(Other helpful information is appreciated as soon as it is clear.)

0


source to share


3 answers


How to get started with Unix



+2


source


Fernando Migeles has given you an excellent source of information. It is easier to stipulate which characters do not really matter. This list will look like this:

A-Z a-z 0-9 _ - . , / + @

      



Any other ASCII punctuation character has some special meaning somewhere. Some members of this list have special meaning when combined with another character; for example, " $@

" and " $-

" are special, but " $

" tells you that instead of " @

" or " -

".

+1


source


On Windows and MS-DOS systems, the following are invalid file names:

CON, PRN, AUX, CLOCK$, NUL
COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9
LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

      

On the rare occasion that you can work around this limitation and create such files, you will run into problems trying to access or view them.

+1


source







All Articles