ls: cannot access file : No such file or directory.

view story

http://serverfault.com – In the shell script, I will have to access the binary logs stored in /usr/local/mysql/data. but when I do this, STARTLOG=000002 ENDLOG=000222 file=`ls -d /usr/local/mysql/data/mysql-bin.{$STARTLOG..$ENDLOG}| sed 's/^.*\///'` echo $file I get the below error : ls: cannot access /usr/local/mysql/data/mysql-bin.{000002..000222}: No such file or directory. But when I manually enter the numbers in the range the shell scripts runs normally without error. (HowTos)