For example, would only expand the second. The and macros stop and resume the expansion of all strings. There are three additional MACRO definitions that expand the capability of the command:, and. Snip-#!/bin/bashĮcho -n # run the commandr=$? # save its exit codeecho -n ""exit $?snip. Instead of command, you would use noexp command where noexp is the following very simple script: This may have some interesting uses but, if it is undesirable, it can be suppressed with an extra layer of redirection. The EXEC macro allows the text that is read from the child process to be parsed for more fldigi macros.
In anticipation of a collection of useful "fldigi scripts", the macro browser contains a macro line for each executable file found in the scripts directory. All of the exported variables will be shown in the transmit window.Here is an example of the results:įLDIGI_RX_IPC_KEY=9876FLDIGI_LOG_LOCATOR=FM02BTFLDIGI_TX_IPC_KEY=6789FLDIGI_LOG_RST_IN=FLDIGI_LOG_FREQUENCY=3581.000FLDIGI_AZ=108FLDIGI_MY_CALL=W1HKJFLDIGI_LOG_TIME=2113FLDIGI_MY_NAME=DaveFLDIGI_VERSION=3.0preGFLDIGI_LOG_NOTES=FLDIGI_LOG_QTH=Mt Pleasant, SCFLDIGI_MY_LOCATOR=EM64qvFLDIGI_DIAL_FREQUENCY=3580000FLDIGI_CONFIG_DIR=/home/dave/.fldigi/FLDIGI_LOG_RST_OUT=FLDIGI_MODEM=BPSK31FLDIGI_LOG_CALL=KH6TYFLDIGI_MODEM_LONG_NAME=BPSK-31FLDIGI_AUDIO_FREQUENCY=1000FLDIGI_LOG_NAME=SkipFLDIGI_PID=14600FLDIGI_FREQUENCY=3581000Īll of the above envelope variables can be referenced in a shell script that is called from within fldigi. Open the macro editor for an undefined macro key and enter the following: This is the directory location for all executable scripts and programs which you might want to call from within the macro. Exported variablesįldigi exports a set of variables to the child process and adds ~/.fldigi/scripts to the PATH variable before running the shell code. The macro defines an external child process (or processes) that will be called by fldigi when the macro key is invoked. Consider all that the following allows you to do from within fldigi and you might want to consider changing over to Linux. Windows' version of file pipes is not fully POSIX compliant, but the function might work in the environment. macro is designed to be used on the Linux OS as it supports fully functional pipes.