25.10.2013 Views

Fldigi - Kambing UI

Fldigi - Kambing UI

Fldigi - Kambing UI

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Detection of existing scripts<br />

In anticipation of a collection of useful "fldigi scripts", the macro browser contains a macro line for each<br />

executable file found in the scripts directory.<br />

The EXEC macro allows the text that is read from the child process to be parsed for more fldigi macros. For<br />

example, try this macro:<br />

cat foo<br />

where foo is a file that contains:<br />

<br />

This may have some interesting uses but, if it is undesirable, it can be suppressed with an extra layer of<br />

redirection. Instead of command, you would use noexp command where<br />

noexp is the following very simple script:<br />

snip---------------------------------------<br />

#!/bin/bash<br />

echo -n ""<br />

"$@" # run the command<br />

r=$? # save its exit code<br />

echo -n ""<br />

exit $?<br />

snip---------------------------------------<br />

There are three additional MACRO definitions that expand the capability of the command: ,<br />

and .<br />

The and macros stop and resume the expansion of all strings. For example,<br />

would only expand the second . By wrapping the<br />

command output in this way we can be sure that no text will be expanded. You might even use<br />

"$@" | sed "s///g"<br />

if you feel paranoid.<br />

<strong>Fldigi</strong>Contents Exec Macro<br />

You can "fork and forget" with an exec macro defined as: exec command -args >/dev/null<br />

Any of the text that appears between the and can reference an executable program or shell<br />

command found in the ~/.fldigi/scripts directory.<br />

Any text output that is returned by the program or script program (or the result of the in-line command) is always<br />

returned to the transmit buffer and appears as appended to the transmit window.<br />

Detection of existing scripts 92

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!