Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/4th/examples/demo/pipes1.4th

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\ 4tH pipes demonstration program
\ Copyright 2002,2008 J.L. Bezemer

\ WARNING: Do not use this program if
\ you don't want the root user to
\ get email!!!

s" ls"        input  pipe + open error? >r to ls
s" mail root" output pipe + open error? >r to mail
r> r> or abort" Cannot open pipe"

ls   use
mail use

." 4tH demonstration program - please ignore!!!" cr
." These are the contents of my current working directory:"
cr cr

begin
  refill
while
  0 parse type cr
repeat

ls   close
mail close


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.