0

Test1.sh script have the below line in it.

source $HOME/set-env -l test_$START_TIME

Test2 script

    while getopts ":l:" opt; do
  case $opt in
    l)
      echo "file name: $OPTARG"
      FILE_NAME=$OPTARG
      ;;
    \?)
      echo "Invalid option: -$OPTARG"
      exit 1
      ;;
    :)
      echo "Option -$OPTARG requires an argument."
      exit 1
      ;;
  esac
done

I am not able to get the 'l' parameter from the Test1.sh script.

Can you please check why it is wrong in it?

Thanks in advance

0 Answers0