Revision [1860]
This is an old revision of CommandXmkpipe made by DavidLee on 2012-08-16 19:25:44.
Command xmkpipe
Name
xmkpipe creates a named pipeSynopsis
xmkpipe [options] nameDescription
Creates a named pipe. If -xml is specified then the pipe is an XDM Item pipe where each element is the internal representation of an XDM Item. Otherwise a Text pipe is created where each item is a character.
Options
-x,-xml | Creates an XML (XDM Item) pipe |
-s,-size num | Limits the pipe to num bytes (text) or num items (xml) |
-close | Closes the write end of the pipe |
Example
xmkpipe -xml x { while xread a ; do xecho $a ; xtype $a ; done <(x) ; echo Done ; } & for i in <[ 1 to 10 ]> ; do xecho <[ <elem>{$i}</elem> ]> done >(x) xmkpipe -close x wait
Result
<elem>1</elem> element() <elem>2</elem> element() <elem>3</elem> element() <elem>4</elem> element() <elem>5</elem> element() <elem>6</elem> element() <elem>7</elem> element() <elem>8</elem> element() <elem>9</elem> element() <elem>10</elem>
Return Value
Returns 0 if the the pipe was successfully created otherwise 1Commands
CategoryCommands