Please see the below shell script:
#!/bin/bash
echo "Enter the date in (YYYY-MM-DD) format: "
read dt
i=00
echo "/opt/log-$dt_$i"
Expected Output :
Enter the date in (YYYY-MM-DD) format:
2020-06-18
/opt/log-2020-06-18_00
But Getting the below output:
Enter the date in (YYYY-MM-DD) format:
2020-06-18
/opt/log-00
Please suggest?