home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / tcl / 1751 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.7 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!rutgers!bellcore!walter!grumpy!bytor
  2. From: bytor@grumpy.bellcore.com (Ross Huitt)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: Running Shell commands
  5. Keywords: Shell, Pipe, TCL/TK, exec, eval
  6. Message-ID: <1992Nov6.125342.15092@walter.bellcore.com>
  7. Date: 6 Nov 92 12:53:42 GMT
  8. Article-I.D.: walter.1992Nov6.125342.15092
  9. References: <1992Nov06.042401.3241@bnr.ca>
  10. Sender: bytor@grumpy (Ross Huitt)
  11. Organization: Bellcore
  12. Lines: 35
  13. Nntp-Posting-Host: grumpy.ctt.bellcore.com
  14.  
  15. In article <1992Nov06.042401.3241@bnr.ca>, tdoan@bnr.ca (Tuan Doan) writes:
  16.  
  17. |> Hello,
  18. |>   
  19. |>    I am trying to get the following shell command to work inside TCL/TK and
  20. |> is having great difficulty.  If anyone know the solution to this, please 
  21. |> post.
  22. |> 
  23. |>    pr -h '[tdoan@crchh404] /bnr/file1' /bnr/file1 | ipr -D"pageduplex off"
  24.  
  25. Try something like:
  26.     exec {pr -h '[tdoan@crchh404] /bnr/file1' /bnr/file1 | ipr "-Dpageduplex off"}
  27.  
  28. The '{}' will protext you from executing the regular expression and you'll have to
  29. move the " in the arg to ipr because of the way Tcl handles strings.
  30.  
  31. |> 
  32. |> I know there is some trick regarding the use of EVAL and EXEC and I have
  33. |> tried several permutation of it; but no success.
  34. |> 
  35. |> Thanks,
  36. |> 
  37. |>  __  __/  /   /   __  /    |   /    Tuan T. Doan
  38. |>     /    /   /   /   /   / |  /     2D53  GREENWAY BNRRICH
  39. |>    /    /   /   __  /   /  | /      ID: TDOAN on BNRRCH/BNRTEX
  40. |> __/  ______/ __/ __/ __/  __/       BNR/NT/MCI CCS7 Development
  41. |>                                     Phone: 6-444-4575/214-684-4575
  42. |> Internet:  tdoan@bnr.ca             Fax: 6-444-3716/214-684-3716
  43. |>       or   tdoan@x400gate.bnr.ca
  44. |> 
  45.  
  46.  
  47.  
  48. Ross Huitt
  49. bytor@ctt.bellcore.com
  50.