<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="" face="Tahoma,sans-serif" color="#000000">Neil,<br><br>No you can't do it that way. You can call a script and then write a variable but that variable will only be active within that script unless you export it and then only to child processes. Why do you want to write a variable? It would be much easier and more understandable to write to a file. Then it would be visible at any point down the line unless you deleted it or rebooted. <br><br>If you do write to a file always write to a tmpfs (ramdisk) like /tmp. We use /tmp for many temporary writes within the code. This avoids any writes to the SD card. Below is an example. This can be done many ways but you need to understand bash scripting etc. Also I would not use simple variable names like I show here but rather full meaningful names so it does not possibly clash with something else. This just copies a value "12" from one variable 'A' to 'B' Where it is written and read could be completely different scripts executed at different times.<br><br>[root@alarmpi ~]# A="12" <br>[root@alarmpi ~]# echo $A > /tmp/delete.me<br><br>[root@alarmpi ~]# B=`cat /tmp/delete.me`<br>[root@alarmpi ~]# echo $B<br>12<br><br>When you are done it is good practice to remove the file unless you are going to use it again.<br><br>[root@alarmpi ~]# rm /tmp/delete.me<br>rm: remove regular file '/tmp/delete.me'? y<br>removed '/tmp/delete.me'<br><br><br id="FontBreak"></font><b><font style="font-size:16pt;" size="4">73 Doug</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">WA3DSP</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">http://www.crompton.com/hamradio</font></b><font style="font-size:16pt;" size="4"><br></font><br><br><div><hr id="stopSpelling">To: arm-allstar@hamvoip.org<br>Date: Thu, 28 Apr 2016 20:04:19 -0400<br>Subject: Re: [arm-allstar] syntax to load a variable via dtmf<br>From: arm-allstar@hamvoip.org<br>CC: k8it@cac.net<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div>Without calling a script to write the variable</div>
<div>could I do something like</div>
<div>82=cmd,/temp/xyz.txt='A'</div>
<div>without using a script?</div>
<div>or is a short script to read $ and then write the temporary
variable</div>
<div> </div>
<div>Thanks<br>73 Neil Sablatzky K8IT<br>Allstar Node 41838
KITLINK<br>Allstar Node 42087 KITLINK HUB<br>IRLP Node exp0068<br>Echolink
K8IT-L<br>WIRES-X K8IT 11479 Room 21479</div>
<div style="FONT:10pt Tahoma;">
<div><font face="Calibri" size="3"></font><font face="Calibri" size="3"></font><br></div>
<div style="BACKGROUND:#f5f5f5;">
<div style=""><b>From:</b> <a title="arm-allstar@hamvoip.org" href="mailto:arm-allstar@hamvoip.org">Doug Crompton via arm-allstar</a> </div>
<div><b>Sent:</b> Thursday, April 28, 2016 12:45 AM</div>
<div><b>To:</b> <a title="arm-allstar@hamvoip.org" href="mailto:arm-allstar@hamvoip.org">ARM Allstar</a> </div>
<div><b>Cc:</b> <a title="doug@crompton.com" href="mailto:doug@crompton.com">Doug
Crompton</a> </div>
<div><b>Subject:</b> Re: [arm-allstar] syntax to load a variable via
dtmf</div></div></div>
<div><br></div>
<div dir="ltr"><font face="Tahoma,sans-serif" color="#000000">Neil,<br><br> I am
not sure what you are asking "load a variable" Do you mean pass a
variable? Here is an example from the rpt.conf file for 24 hour time
-<br><br>82=cmd,/usr/local/sbin/say24time.pl 27225<br><br>When *82 is sent it
runs the file say24time.pl and passes the variable 27225, the node number
to say the time on. This would be the same as typing - say24time.pl 27225
at the Linux prompt.<br><br>The path and file could be anything available on
your system and you could pass multiple variables if desired. The variables are
returned differently in the actual program depending on what language it is. For
bash the above variable would be passed as $1 for Perl as in the example above
it is passed as $ARGV[0]<br><br>Is this what you are asking?<br id="ecxFontBreak"></font><br><b><font style="FONT-SIZE:16pt;" size="4">73
Doug</font><font style="FONT-SIZE:16pt;" size="4"><br></font><font style="FONT-SIZE:16pt;" size="4">WA3DSP</font><font style="FONT-SIZE:16pt;" size="4"><br></font><font style="FONT-SIZE:16pt;" size="4">http://www.crompton.com/hamradio</font></b><font style="FONT-SIZE:16pt;" size="4"><br></font><br><br>
<div>
<hr id="ecxstopSpelling">
To: arm-allstar@hamvoip.org<br>Date: Wed, 27 Apr 2016 23:13:35 -0400<br>Subject:
[arm-allstar] syntax to load a variable via dtmf<br>From:
arm-allstar@hamvoip.org<br>CC: k8it@cac.net<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div>I forgot the syntax to load a string variable with a DTMF code</div>
<div>such as</div>
<div>888 = /temp/xyz.txt="P"</div>
<div> </div>
<div>Thanks<br>73 Neil Sablatzky K8IT<br>Allstar Node 41838
KITLINK<br>Allstar Node 42087 KITLINK HUB<br>IRLP Node exp0068<br>Echolink
K8IT-L<br>WIRES-X K8IT 11479 Room 21479</div>
<div style="FONT:10pt Tahoma;">
<div><br></div><br></div></div></div></div> </div></body>
</html>