Special Characters (not talking about anyone in particular...)
---------------------------------------------------
the following are standard special characters:
& ; | * ? ' " ` [ ] ( ) $ < > { } ^ # / \ % ! ~ -
(spaces also have significance)
---------------------------------------------------
here's a little about some of the characters:
the & (ampersand) may be used to place jobs in the background, example:
netscape &
the ; (semicolon) may be used to separate commands so that more than one thing
may be started, example:
ls -al $HOME/*.pkg > /tmp/pkg-listing ; lp -dlaserjet /tmp/pkg-listing ; rm /tmp/pkg-listing
the | (pipe symbol) is used to pass processes through a pipe... for example:
ls -al $HOME/*.pkg | tee /tmp/pkg-listing
If you replace the " > /tmp/pkg-listing " with " | tee ..." you will be able to see
the listing AND pipe the outputs of the display to the file you've designated.
There are multiple uses of the pipe that are helpful for system administration task.
the * (asterick) is used as a wildcard. Be very careful with it when using "rm". For example:
rm *.bak is different than rm * .bak
the first use of * will remove all files ending in .bak, while the second
will first remove ALL files and then probably give an error that it
couldn't find the file named ".bak". Mainly because there won't be any
files left. This is when you realize that UNIX does not have an undo command.
THEREFORE, it is recommended that you alias "rm" to "rm -i" in your .profile or .cshrc
(this may cause problems with poorly written scripts and some applications though, if
you have problems using an application that expects to move or remove files you may
need to unalias rm before using that tool.)
the ? (question mark) used by the shell as a wildcard meaning any character.
BEWARE of how you use these characters. Avoid using them in file names.
In fact, do NOT use any of them except the "-" or "#" in a filename, and
I'd avoid using them as well. NEVER, EVER put a space in a UNIX filename.
(That Microslop, er soft, would allow such an abomination is horrific! Yeah,
I know, they were just trying to keep up with the macintrashes... but I really
don't have any opinions on this issue or anything... :-)
*********************************************************
EMAIL TO: john-at-wagoneers.com
Copyright © 1997 John Meister All rights reserved.