![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script needs to be modified - Each 5 Rows to be joined in single line with comma (,) | ntgobinath | Shell Programming and Scripting | 0 | 05-07-2008 05:37 AM |
| grep exclude/find single and double quotes | Lindy_so | UNIX for Dummies Questions & Answers | 4 | 03-06-2008 05:01 AM |
| Single v. double quotes in sed (GNU utilities for Win32 version) | daddydojo | Shell Programming and Scripting | 2 | 08-05-2007 02:26 PM |
| single or double quote in SED | asami | Shell Programming and Scripting | 2 | 07-17-2006 12:03 AM |
| Counting occurence of a coma | dbrundrett | Shell Programming and Scripting | 3 | 01-22-2004 01:40 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
difference between double inverted coma and single inverted comma
Whats the basic difference between double inverted comma and single inverted comma and no comma applied at all?
Eg1 if [ -f "$filename" ] Eg2 if [ -f $filename ] iEg3 f [ -f '$filename' ] |
| Forum Sponsor | ||
|
|
|
|||
|
Code:
' is a tic or tic-mark or single quote " is a double quote Code:
if [ -f $filename ] translates $filename - if it has spaces the shell "thinks" $filename
is really separate values with no spaces
if [ -f "$filename" ] translates $filename - if it has spaces the shell "thinks" $filename
is realy one single value, spaces included
if [ -f '$filename' ] does not translate filename - the shell takes the $ literally, not
as a shell token meaning return the value of a variable
|
|||
| Google The UNIX and Linux Forums |