Re: Bash Scripting Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Thomas Kappelmueller <tkappelmueller@xxxxxxxxxxxxxxxx> wrote:

> Hello!
> 
> I hope this place is ok to ask this question.
> I am using Fedora 8.
> 
> Example:
> #!/bin/bash
> 
> COMMAND='ls "test dir 1"'

bash will "expand" what's between double quotes,
so it considers the spaces as seperators
(like on the command-line). try:
COMMAND='ls "test\ dir\ 1"'

> 
> $COMMAND #have tried $($COMMAND), '$COMMAND'
> 
> It always cuts it in half at the spaces.
> 
> Error msg:
> ls: cannot access "test: No such file or directory
> ls: cannot access dir: No such file or directory
> ls: cannot access 1": No such file or directory
> 
> What am i not seeing?
> 
> thanks in advance
> 
> -T
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> 


:                  Do  What Thou  Wilt                     :
         
:                       Shall  Be                          :

:                The  Whole  of The  Law                   :

                            --Aleister Crowley--

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux