home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / shell / 4599 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.unix.shell,comp.unix.question
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net!convex!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: Changing a 1 line zsh script to sh,perl,csh or tcsh etc.
  5. Originator: tchrist@pixel.convex.com
  6. Sender: usenet@news.eng.convex.com (news access account)
  7. Message-ID: <1992Nov9.144605.7727@news.eng.convex.com>
  8. Date: Mon, 9 Nov 1992 14:46:05 GMT
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. References: <1992Nov8.020133.4348@midway.uchicago.edu>
  11. Nntp-Posting-Host: pixel.convex.com
  12. Organization: Convex Computer Corporation, Colorado Springs, CO
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 17
  17.  
  18. From the keyboard of lie6@midway.uchicago.edu:
  19. :How would I write this in sh, or perl, or csh, or tcsh?
  20. :
  21. :#!/bin/zsh
  22. :ARGV0='-tcsh                                    .' $1 $2 $3 $4
  23.  
  24. If I understand what you're doing (changing what ps sees):
  25.  
  26.     #!/usr/bin/perl
  27.     $0 = "-tcsh                                      . @ARGV";
  28.  
  29. --tom
  30. -- 
  31.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  32.  
  33.     "* Unix is a footnote of AT&T Bell Laboratories."
  34.                              --Barry Shein
  35.