LinuxQuestions.org
Help answer threads with 0 replies.
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 07-28-2004, 12:05 PM   #1
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Rep: Reputation: 30
what does \ do in a command?


You know how when you at the cli, and you type in a command and hit enter? well sometimes I hit the \ key as well as enter and it drops down to another line that starts with a ?. What is the function of that?
 
Old 07-28-2004, 12:43 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You use the backslash-enter key sequence to tell the shell you are giving it a multi-line command. The line starting with the question mark is just the shell's way of saying "Ok, gotcha... you need another line. Here's a very simple prompt so you can continue."
 
Old 07-28-2004, 01:12 PM   #3
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
backslash is a special key, its use means take the next key as its ascii value, NOT its assigned function..

for example. in C++.. here is a hello world program.

cout << "Hello World";

but what if you wanted cout to print the character [ " ]

cout << " She said "You Smell !" ";
COMPILE error. !!!!

so you would use

cout << " She said \"You Smell !\" ";

the same thing is used to put spaces in file names (in command line)

Last edited by qwijibow; 07-28-2004 at 01:13 PM.
 
Old 07-28-2004, 01:21 PM   #4
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Original Poster
Rep: Reputation: 30
Ahh i gotcha thanks.
 
  


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
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 11:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM


All times are GMT -5. The time now is 07:45 PM.

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