I'm new with bash and doing my first steps in it I want to learn How to store argument localy in script for later use and wrote this script
#!/bin/bash
while getopts ":d" opt;do
case "${opt}" in
d)
d =$OPTARG
echo "-d was triggered ! storing ${d}" >&2
;;
esac
done
this is my output :
$ -d was triggered! storing
what is my problem? : I don't store the data correctly or I don't print it correctly or both :)