Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!mips!ptimtc!nntp-server.caltech.edu!egg!walkera From: walkera@egg.gg.caltech.edu (Walker Aumann) Newsgroups: comp.unix.questions Subject: Why #!/bin/[c]sh? Summary: What does this line do? Message-ID: Date: 29 Jun 91 19:09:39 GMT Article-I.D.: smoggy.walkera.678222579 Sender: news@nntp-server.caltech.edu Distribution: all Organization: California Institute of Technology, Pasadena Lines: 20 I recently needed to use one command many times with one parameter, namely: find -user -exec chgrp newgroup {} \; When I typed the line in explicitly, or set things up to look for group and use . in place of the first username, it worked fine, but even the script find . -group oldgroup -print failed to return anything. That is, until I added the magic line #!/bin/csh to the beginning. For background, I was logged in as a user, su'ed, and running csh (with the user .login and .cshrc). (Please, no security flames - I'm still working on that) Running which said that there were no conflicts with the script name, or find (i.e. I was running what I thought I was running). So I know the fix for the problem I had, but why, and what does this line do? Walker Aumann walkera@maggot.gg.caltech.edu