Web page hosting and cheap domain registration & search engine ranking services
  

 

When Is a Backslash Not a Backslash?

[return-to: Overview: Sending MH Messages] [table of contents] [index]

UNIX uses the backslash character (\) in a lot of places, which can be confusing for beginners. Here's a guide to backslashes:

  • When you're typing a line of input on a terminal and you want to tell UNIX that "this next RETURN I'm going to type is not the end of the line," you'll often type a backslash just before the RETURN. That happened in the previous example, where you wanted to tell prompter that the next RETURN key you pressed would not be the end of the field. Backslashes are often typed before a RETURN, to continue a line.
  • Backslashes are also used when you're typing special characters. For instance, some versions of UNIX use the at sign (@) character as the "line kill" character. That means when you type an @ on your terminal, you're telling UNIX to forget everything you've typed so far on that line and start over.

    Sometimes -- when you're typing a mail address like vicki@squidbait, for example, you want a literal @ character. You don't want the @ to erase the word "vicki." On those UNIX systems, you'd type vicki\@squidbait to tell UNIX, "Treat this next @ literally."

  • When some UNIX programs display on a terminal and a line is too long to fit on the screen, they split the line into pieces and show a backslash (\) at the end of each piece of the line except the last. One example is the GNU Emacs editor. GNU Emacs will display a very long line this way:
    This is the first part of the very long line etc. etc. \
    and... this is the second part blah blah blah etc. etc.\
    and now this is finally the end of the line.
    

    In that case, the backslash is not really in the file that Emacs is showing; it's just a signal to you that the line continues.

 

 

 

 
 

Disclaimers: This document is provided as free service for the benefits of Active-Venture.com's web hosting customers only.

 
Quotes: