Creating In-Stream Data with the data Command
...
The syntax for the
data command is as follows:
Panel |
---|
Html bobswift |
<pre>
data [NAME|print=NAME] [resolve=all|defined|no] [end=ENDSEQUENCE]
[DATA]
end|ENDSEQUENCE
</pre>
|
Creating an In-Stream Data Element
...
The end-of-data marker or end sequence marks the end of the data. By default, this is simply the word
end. It must appear separately, on its own line. However, it is possible that
end is valid instream data and you can change the end sequence with the
end parameter of the data command.
Example
The following example shows how to use the data command in conjunction with the exec command to look through a series of copied files and display lines with the occurrence of some string under UNIX:
Panel |
html-bobswift |
---|
<pre>
open remote=yourmachine user=someguy pwd=somepwd
data mydata resolve=all
grep "this is my sequence" $(_file)
exit
end
copy local=*.txt
forfiles remote=*.txt
exec remote cmd=ksh input=mydata
end
close
</pre>
|
Printing Data Element Information
...
Continuing with the previous example, issuing:
Panel |
---|
Html bobswift |
<pre>
data print=mydata
</pre>
|
Will produce the following output:
Panel |
---|
Html bobswift |
<pre>
----> Begin 'mydata' <----
grep "this is my sequence" $(_file)
exit
----> End 'mydata' <----
</pre>
|