In a bash script, I have the command:
Code:
ls -l --time-style=+'%y/%m/%d %H:%M:%S'
which works perfectly. I have tried to put all the options into a bash variable, but can't get ls to work that way:
Code:
options="-l --time-style=+'%y/%m/%d %H:%M:%S'"
ls $options
ls: cannot access '%H:%M:%S': No such file or directory
I have tried escaping the space character, with no effect. How can I get this to work?