There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Special characters in shell


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
pastorjim2's Avatar
Member with 47 posts.
 
Join Date: Feb 2003
Location: So. Cent. TN
Experience: Intermediate
21-Jun-2003, 09:27 PM #1
Special characters in shell
In doing some reading about characters in shell commands it says that you can use quotation characters to disable or modify a characters meaning--is that correct?<br>Question is why would you disable characters by quoting?<br>Why not just omit the character from the command line in the first place? or am I missing something?
__________________
"Do unto others as though you were the others" Elbert Hubbard
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
23-Jun-2003, 01:22 AM #2
The intent is to allow you to process arguments (filenames, etc.) that may contain special characters that are otherwise significant to the shell (such as asterisk ('*') or ampersand ('&'), for example). Even embedded blanks (space characters) are problematic for the shell, since normally a blank separates arguments; if you wish to treat several consecutive words as a single argument, then quotes will allow you to do so.

Naturally, the story doesn't end there -- single quotes and double quotes are treated slightly differently by the shell, and sometimes those differences become significant. However, the principle is still the same: quotes "protect" special characters from being interpreted by the shell as they normally would.

Hope this helps.
__________________
The slowest component still sits at the keyboard.
pastorjim2's Avatar
Member with 47 posts.
 
Join Date: Feb 2003
Location: So. Cent. TN
Experience: Intermediate
23-Jun-2003, 09:31 AM #3
Quote:
quotes "protect" special characters from being interpreted by the shell as they normally would.
<br>Thanks codejockey!! Now it makes sense to me. I appreciate your making it easier to understand. jim
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
23-Jun-2003, 11:25 PM #4
Glad I was able to help make sense of things.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:02 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.