I'm currently writing a bash script. I do have a two if commands. I cant really describe the problem here so I'm gonna describe my problem in codes
#!/bin/bash
echo -e "What is the SGID?"
read Cevap50
if [ ! -f /home/fixscript/AudioBot$audiobot_port/.adminlikler_sgid_silmeyin ]
then
rm -rf .rights.toml
touch .adminlikler_sgid_silmeyin
echo -ne "$Cevap50" >> .adminlikler_sgid_silmeyin
adminlikler_sgid=`cat .adminlikler_sgid_silmeyin`
rights_bir
echo " groupid = [ $adminlikler_sgid ]" >> .rights.toml
echo ' # And/Or your admin Client Uids here' >> .rights.toml
elif [ ! -f /home/fixscript/AudioBot$audiobot_port/.adminlikler_uid_silmeyin ]
then
echo " useruid = []" >> .rights.toml
rights_iki
clear
else #There is the problem, this else should affect line 14th's if. But it just effects both of them.
#Some Codes
else #This else should affect line 5th's if.
https://shellcheck.net
, a syntax checker, or installshellcheck
locally. Make usingshellcheck
part of your development process.