I’d like to get contents of a file. I have stumbled upon this SO answer, which works perfectly:
smbclient -E -U $USERNAME //server/sharename $PASSWORD -c 'get \\dir\\file /dev/fd/1'
Could we add a method like readFile()? Subsequently, could we also and an method to writeFile() (different from sendFile() that the contents would be in memory only, not a file)?