Bash Scripting Problem
charles f. zeitler
cfzeitler at yahoo.com
Wed May 21 06:04:52 UTC 2008
--- Thomas Kappelmueller <tkappelmueller at thomas-krenn.com> 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 at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
: Do What Thou Wilt :
: Shall Be :
: The Whole of The Law :
--Aleister Crowley--
More information about the fedora-list
mailing list