Xref: utzoo comp.unix.questions:9795 comp.unix.wizards:11797 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!convex!texsun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Why does a shell script fail in crontab? Message-ID: <1539@solo11.cs.vu.nl> Date: 18 Oct 88 05:02:44 GMT References: <287@lakart.UUCP> Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Informatica, Amsterdam Lines: 22 In article <287@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes: \when it runs from crontab it produces a zero size Index file, yet when I \run it by hand from a uid 0 shell it succedes, and generates the correct \Index file. \... \bm "#N" [du].* | sed 's/:#N/ /' | tr -s '\011, ' ' ' | \ \ awk '{ for (i = NF; i > 1; --i) printf "%s\t%s\n", $i, $1 }' | \ \ sort -u > Index I bet `bm' is in /usr/local, which is not in sh's standard PATH, but IS in yours! The `Index' file is created, but the command fails. \Note: this is a setuid \root shell script - yes I am aware of the possible security leak, but there \are only two people who use lakart that are unix.wizards, and we both know \the root password. Some people will never learn... -- Hippic sport: |Maarten Litmaath @ Free U Amsterdam: a contradiction in terms.|maart@cs.vu.nl, mcvax!botter!maart