I've reordered this reply to get rid of top posting... On Tue, 2021-09-28 at 17:38 +0000, Nils wrote: > Am 28. September 2021 19:32:02 MESZ schrieb Greg Wooledge < > g...@wooledge.org>: > > On Tue, Sep 28, 2021 at 08:19:26AM -0700, pe...@easthope.ca wrote: > > > > CONCLUSIONS > > > > > > > > Audio messages can be interpreted. Eg., > > > > set AUDIODEV=plughw:CARD=ICH5,DEV=0; play m94.WAV > > > > > > Hasty reply. In further use, didn't always work. I removed the PCI > > > sound card, removed the plastic cover from the sockets on the system > > > board and connected speakers. Subsequently commands such as this > > > always work. > > > > > > set AUDIODEV=plughw:CARD=ICH5,DEV=0 ; play a42.WAV > > > > Are you in csh/tcsh? If you're in a more "normal" shell (bash or zsh), > > that set command doesn't do anything useful. Certainly nothing that > > would affect the play command. > > > > Even if you're in (t)csh, my understanding is that "set" sets shell > > variables, and you need "setenv" to set environment variables (which > > could conceivably affect the play command). So, even in (t)csh, I > > don't see how your set command is supposed to work. > > > > Other shells... rc? fish? I don't know these. I have no idea what > > the set command does in them. > > > > I agree. In the "normal" shells, you need to use "export" instead of "set"! >
Or, if you don't want to assign the variable value in the current shell environment, just that of an external command you run, then you can make the assignment part of the same command expression: VAR=value command Example in action... $ FOO=foo $ FOO=bar sh -c 'echo $FOO' bar # command above saw new value 'bar' $ echo $FOO foo # this shell kept original value 'foo' -- Tixy