fork download
  1. # !bin/bash
  2.  
  3. re ="-([^-]*)-"
  4. for i in *
  5. do
  6. if [[ $i =~ $re ]]; then echo ${BASH_REMACHTCH[1]};
  7. fi
  8. done
Success #stdin #stdout #stderr 0s 19632KB
stdin
Standard input is empty
stdout

	
stderr
./prog.sh: line 3: re: command not found