home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10526 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.8 KB

  1. Path: sparky!uunet!europa.asd.contel.com!gatech!pitt.edu!djbpitt
  2. From: djbpitt+@pitt.edu (David J Birnbaum)
  3. Newsgroups: comp.unix.questions
  4. Subject: sh, tcsh, and alias differences
  5. Message-ID: <5313@blue.cis.pitt.edu.UUCP>
  6. Date: 30 Aug 92 19:35:25 GMT
  7. Sender: news+@pitt.edu
  8. Organization: University of Pittsburgh
  9. Lines: 36
  10. Originator: djbpitt@unixd2.cis.pitt.edu
  11.  
  12. For odd reasons apparently related to AFS mounts, the purge utility
  13. (part of the athena safe delete suite, available as athena-rm.tar-z
  14. from your favorite archive) won't execute purge correctly on my sys-
  15. tem (purge permanently removes files that were deleted using the safe
  16. delete). Expunge, a related utility, takes assorted options and can
  17. be made to act like purge and to do what I want on my system. I run
  18. under tcsh and my purge script, replacing the internal purge, looks 
  19. like:
  20.  
  21.     #!/bin/sh
  22.     expunge -r -i -l -s -y -m -v \* 2> /dev/null
  23.  
  24. Now ... how do I do this in tcsh? The following works as an alias:
  25.  
  26.     "( expunge -r -i -l -s -y -m -v \* > /dev/tty ) > & /dev/null"
  27.  
  28. but when I try it as a shell script I get a "not found" message. I've
  29. tried different types of quotes and escapes - to no avail. Some varia-
  30. tions object to the ampersand; others to /dev/null. Yes, the script is
  31. executable, yes, it's in my path, yes, I removed the original purge from
  32. my bin, and yes, I rehashed.
  33.  
  34. I realize the short answer to my question is "you do this in tcsh
  35. exactly the way you did; you invoke sh and don't muck around." But to 
  36. satisfy my 'satiable curiosity, why doesn't my tcsh script work, even 
  37. while the alias and sh scripts do?
  38.  
  39. Thanks,
  40.  
  41. David
  42.  
  43. -- 
  44. Professor David J. Birnbaum         djbpitt+@pitt.edu [Internet]
  45. The Royal York Apartments, #802     djbpitt@pittvms   [Bitnet]
  46. 3955 Bigelow Boulevard              voice: 1-412-687-4653
  47. Pittsburgh, PA  15123  USA          fax:   1-412-624-9714
  48.