import.sh 215 B

123456789101112131415161718
  1. #!/bin/bash
  2. while getopts "f:" opt
  3. do
  4. case "$opt" in
  5. f ) input="$OPTARG" ;;
  6. esac
  7. done
  8. if [ -z "$input" ]
  9. then
  10. echo "-f for file path"
  11. else
  12. while IFS= read -r line
  13. do
  14. ./tm "$line"
  15. done < $input
  16. fi