piping problem

Joel Hammer Joel at HammersHome.com
Wed Jan 23 21:08:02 GMT 2002


Messing with this some more. If you want to include line feeds in your
message, this works:
MESSAGE="First line\x0ASecond line"
at least with linux and vi.
You may need to add linefeeds and carriage returns for windows clients, like
so:
MESSAGE="First line\x0D\x0ASecond line"
But, I haven't tried this out.

And, add a -e to the echo $MESSAGE command like so:
export MESSAGE;export RECIPIENT;echo 'echo -e $MESSAGE | smbclient -M $RECIPIENT' | at now + 1 minute
                                            ^

Joel


On Wed, Jan 23, 2002 at 11:34:36PM -0500, Joel Hammer wrote:
> These jobs are stored in /var/spool/atjobs
> If you look at them, they are just shell scripts. AND, they have all the
> shell variable defined when the at command was run. So, I would just export
> the variables you want to be available when atd runs the script, then run at.
> And, you can look at these scripts and see just what sort of commands atd is
> actually trying to run.
> This works:
> export MESSAGE;export RECIPIENT;echo 'echo $MESSAGE | smbclient -M $RECIPIENT' | at now + 1 minute
> I haven't fooled around with the time variable, but that shouldn't be any
> different from the others, hopefully.
> 




More information about the samba mailing list