Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!quanta.eng.ohio-state.edu!kcgl1.eng.ohio-state.edu!DAVISM From: DAVISM@kcgl1.eng.ohio-state.edu (Michael T. Davis) Newsgroups: comp.unix.questions Subject: Explanation of strange script behavior sought Message-ID: <1919@quanta.eng.ohio-state.edu> Date: 13 Apr 89 23:50:13 GMT Sender: news@quanta.eng.ohio-state.edu Organization: Ohio State University Lines: 29 I'm trying to use the script below to determine where on the local network a particular user is logged onto, if they are logged on at all. I can't get it to accept more than one parameter, though. If I call it "where", with the execute bit set in the protection mask, I can call it via "where username1 username2 ...". However, as I've already stated, it only accepts the first parameter. What am I doing wrong, or even better -- is there an easier way to do what this script does? Here's the script: ---------------------------------------- #!/bin/csh -f # foreach username ( $argv[*] ) rwho | grep -w $username end ---------------------------------------- Thanks, Mike __________________________________________________________________________ | THE InterNet address> davism@kcgl1.eng.ohio-state.edu | -------------------------------------------------------------------------- | These_Thoughts := My_Own | |************************************************************************| | "Daddy, Daddy!! Why's Mommy running across the field?" | | "Shut up Son, and reload." | --------------------------------------------------------------------------