On Fri, Jul 12, 2013 at 9:48 PM, wrote:
> I want a script to execute the command:
> ls -alst "dir with spaces"
>
>
> The script looks like this :
> #! /bin/bash
>
> PARAMS_FOR_LS="-alst \"dir with spaces\""
>
> echo $PARAMS_FOR_LS
>
> ls $PARAMS_FOR_LS
>
>
>
> when I execute the script:
> bash -x
On Fri, 12 Jul 2013, gscant...@comcast.net wrote:
I want a script to execute the command:
ls -alst "dir with spaces"
The script looks like this :
#! /bin/bash
PARAMS_FOR_LS="-alst \"dir with spaces\""
echo $PARAMS_FOR_LS
ls $PARAMS_FOR_LS
$PARAMS_FOR_LS is subject to word splitting.