I have a script which takes input for two variables from users. Then, I try to use those variables in a command which is in turn being fed into a condition in an if. However, the user input value is not replacing my variables and as a result, my command is not working -# Get acl and dc valuesecho Type the ACL name:read aclecho Type the DATACENTER nameread dc# see if sw-list-cisco file exists in ~/$acl directoryif [ ` ls -1 ~/$acl/sw-list-cisco > /dev/null | wc -l ` -gt 0 ];then    echo Going to do somethingelse     echo no match !!!!!!!!!!!!!fiThe if [ ` ls -1 ~/$acl/sw-list-cisco > /dev/null | wc -l ` -gt 0 ]; condition doesn't seem to be replacing $acl with the user input value. I have verified manually that sw-list-cisco exists in the ~/$acl directory.  What am I missing? 
How to leverage a user defined variable in a command to create a condition in an if
bash;variable;variable substitution
You rarely, if ever, need to parse the output from ls.In this case, you may get by by just doingif [ -f $HOME/$acl/sw-list-cisco ]; thenI'm using the -f test to test whether the given name exists and is the name of a regular file.  I'm using $HOME rather than ~ since ~ does not behave as a variable inside quotes (and $HOME is much more descriptive, IMHO).