Posted to tcl by dgp at Wed Jun 03 12:51:11 GMT 2015view raw

  1. spalt:~/erp: cat test1.tcl
  2. #!/bin/env tclsh
  3. set a 100
  4. exec ./test2.tcl &
  5. puts $a
  6. exit
  7. spalt:~/erp: cat test2.tcl
  8. #!/bin/env tclsh
  9. set b 3
  10. puts $b
  11. exit
  12. spalt:~/erp: ./test1.tcl
  13. 100
  14. spalt:~/erp: 3
  15. ls
  16. test1.tcl* test2.tcl*
  17. spalt:~/erp:
  18.