Hi all,
Is there a simple way to use gawk through the spawn command and get
the result in string array ?
Example:
in shell
$ echo Hello ferreters | awk '{print $2}'
in ferret
yes? spawn echo Hello ferreters | awk '{print $2}'
But how to get the result in a string array like
yes? LET a = {spawn:"ls *.nc"}
yes? LIST a
yes? let A = {spawn:"echo Hello ferreters | awk '{print $2}'"}
**ERROR: command syntax: {spawn:"echo Hello ferreters | awk '{print
$2}'"}
unclosed quotation, parenthesis, or bracket
Up to now, I have used a trick by passing by an external shell script
like:
let A = {spawn:"echo Hello ferreters | awk -f get_2nd.awk"}
but that is not as easy as it could be.
Could the syntax parsing of the spawn command be changed ?
Patrick