![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dealing with spaces in file names in a shell script | same1290 | Shell Programming and Scripting | 5 | 08-13-2008 12:01 AM |
| How to list filenames with spaces in shell script | hikrishn | Shell Programming and Scripting | 1 | 06-18-2008 05:33 PM |
| TRIM spaces in shell | anumkoshy | UNIX for Advanced & Expert Users | 3 | 08-31-2007 05:13 AM |
| Strip leading and trailing spaces only in a shell variable with embedded spaces | jerardfjay | Shell Programming and Scripting | 6 | 03-07-2005 02:24 PM |
| any explanation for thsi shell script behaviour | xiamin | Shell Programming and Scripting | 9 | 11-09-2001 01:13 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Spaces behaviour in shell
Hello,
I am a bit puzzled by the way my shell treats spaces in filenames. An example will be way clearer than any explanation I can make: Code:
$ ls test\ file\ with\ spaces test file with spaces $ var="test\ file\ with\ spaces" $ echo $var test\ file\ with\ spaces $ ls $var ls: cannot access test\: No such file or directory ls: cannot access file\: No such file or directory ls: cannot access with\: No such file or directory ls: cannot access spaces: No such file or directory I've been crawling on the internet for a long time, but I haven't been able to find any documentation on this particular issue. |
| Bookmarks |
| Tags |
| shell spaces |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|