I want to use an environment variable in a command with recursive search.
export RAILS_FILE_EXTENSIONS='(erb|feature|haml|jrxml|js|rake|rb|rxml|scss|xml|yml)'
ls **/*.${RAILS_FILE_EXTENSIONS}
It does not work this way. How should it look like?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Tell zsh to interpret
RAILS_FILE_EXTENSIONSas a pattern rather than a raw string when substituting its value, with the~parameter expansion flag.