How do you set an environment variable's value to the output of a command?
It seems like this would work, but it doesn't:
set LIST=`ls | grep -v dump`
Nor does this, even though the Advanced Bash Scripting Guide suggests it here in lesson 12-15:
output=$(sed -n /"$1"/p $file) # Command substitution.
My code snippet:
set DATE = $(date +%b%d%Y)
#get repo list
set REPOS = $(ls | grep -v dump)
echo date: $DATE repos list: $REPOS
date: repos list: