Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: command line options Message-ID: <12907@brl-adm.ARPA> Date: 11 Apr 88 02:37:23 GMT Sender: news@brl-adm.ARPA Lines: 23 From: Arthur David Olson 3. I want to be able to find out if "--" was used on the command line. Pike's Position is that Programs that accept multiple filenames should do nothing if given no arguments. (The name and wording are mine; see page 186 of "The UNIX Programming Environment"). This ensures that if you use a command such as cat `find * -type f -print` to concatenate all the files in a directory and its subdirectories, you won't get surprised when there are NO files in the directory and cat starts reading from its standard input. Add /dev/null to the end. This trick is also used in the GNU emacs `grep' command. They add /dev/null to the end so that grep will tell which file it was found in, even if there was only one specified. (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688 There's enough money here to buy 5000 cans of Noodle-Roni!