Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucsd!hub.ucsb.edu!ucsbuxa!6600bori From: 6600bori@ucsbuxa.ucsb.edu (Boris Burtin) Newsgroups: comp.unix.questions Subject: C shell question about foreach Keywords: csh, foreach Message-ID: <11842@hub.ucsb.edu> Date: 4 Jun 91 23:30:40 GMT Sender: news@hub.ucsb.edu Distribution: comp Lines: 22 I'm trying to write a csh script that will execute a series of commands for every directory that exists in /home/pluto. This script works if I execute it while I'm logged in, but it gives me a syntax error at line 7: `(' unexpected when I try to run it from crontab. I'd appreciate any help I can get! Here's the code: -------- # set people = `ls /home/pluto` foreach person($people[*]) echo $person >> /tmp/test.txt end -------- - Boris Burtin (6600bori@ucsbuxa.ucsb.edu)