Try
REMOTE_SHARE='\\server_address\share_folder'
. The <(echo …)
part looks weird. < <(echo …)
would be weird, but working. echo … | smbclient …
would be almost fine. smbclient …<<<"…"
would be OK, I guess; or a here document. And then you say you don't want smbclient
, you want to mount. So what is the point of the script? "The script was created with an AI" – Say no more. The script does not try to do what you want, but at least it's buggy. Play stupid games, win stupid prizes. I vote down because obfuscating the question with AI-generated crap is the opposite of research effort.