SUMMARY: A puzzling ksh problem

FreakaZoid (shadow6@bellsouth.net)
Wed, 18 Mar 1998 16:03:05 -0600

I would like to thank all who responded and apologize for taking up the
bandwidth of the list nazis.

I found it shortly after posting.... The eval <command string> works
wonders!

> This one is either easy or just can't be done?
>
> I have a user who wants to create a command line out of three
different
> variables in a ksh function/script. The user collects the pieces and

> sets a variable, and uses the variable on one line. The command(s)
> almost execute but then it isn't what you would expect.
>
> e.g.
>
> #!/bin/ksh
> MORE="| more"
> LS=ls
> LS_CMD="$LS $1 $MORE"
>
> $LS_CMD
>
>
> Any help will be greatly appreciated. This would be easily done in
perl
> or C, but the user is hard core KSH so this must be in the KSH.
>
> Thanks again.
>
>