Peter Oram
2006-Jun-07 01:17 UTC
[Samba] Sending popup message via smbclient to w2k and winxp machines
I have a script that is attempting to notify a user that a job has finished. However, when called from within the script nothing is received by the user. When the equivalent message is sent from the command line, the user receives the message. The portion of the script that is relevant is below: ----- cut from script ----- #!/usr/bin/sh : : MESSAGE="$WINNAME, your job $_3GJOB\nhas successfully completed" echo "$MESSAGE" | /path/to/smbclient -M trout > /dev/null 2>&1 echo "$MESSAGE\n/path/to/smbclient -M trout >> logfile.txt ----- end of script ----- The last line was added by myself to test that all variables are being interpreted correctly, which examination of the contents of logfile.txt confirms. Why isn't the message being sent from within the script? I am running Samba 3.0.7 on Solaris 8, and the Windows Messenger service is running on all W2K and WinXP machines. Peter Oram Sys Admin 3G Mobile Support NEC Australia
Adam Nielsen
2006-Jun-07 01:33 UTC
[Samba] Sending popup message via smbclient to w2k and winxp machines
> MESSAGE="$WINNAME, your job $_3GJOB\nhas successfully completed" > echo "$MESSAGE" | /path/to/smbclient -M trout > /dev/null 2>&1 > echo "$MESSAGE\n/path/to/smbclient -M trout >> logfile.txt > > Why isn't the message being sent from within the script?Is it a redirect issue? What happens if you change the line to: (echo "$MESSAGE" | /path/to/smbclient -M trout) > /dev/null 2>&1 Cheers, Adam.