Re: Bash Scripting Problem

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

 



On Tue, May 20, 2008 at 07:31:16PM +0200, Thomas Kappelmueller 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"'
> 
>  $COMMAND #have tried $($COMMAND), '$COMMAND'
> 
>  It always cuts it in half at the spaces.

$ eval $COMMAND
ls: cannot access test dir 1: No such file or directory

Though I recommend other ways. Like using functions
f() { ls "test dir 1"; }
COMMAND=f
$COMMAND

-- 
lfr
0/0

Attachment: pgpt71OgAPEJ3.pgp
Description: PGP signature

-- 
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