Command xmkpipe


Name

xmkpipe creates a named pipe

Synopsis

xmkpipe [options] name

Description


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.

if -size is specified it limits the pipe to num bytes (text default 10240) or num elements (default 100)


Options

-x,-xmlCreates an XML (XDM Item) pipe
-s,-size numLimits the pipe to num bytes (text) or num items (xml)
-closeCloses 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 1


Commands
CategoryCommands
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki