Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site spuxll.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!sdcrdcf!sdcsvax!akgua!whuxle!spuxll!npl From: npl@spuxll.UUCP (Nick Landsberg) Newsgroups: net.unix-wizards Subject: Why parse lines with colons Message-ID: <526@spuxll.UUCP> Date: Tue, 17-Jul-84 00:08:25 EDT Article-I.D.: spuxll.526 Posted: Tue Jul 17 00:08:25 1984 Date-Received: Fri, 13-Jul-84 03:40:15 EDT Organization: AT&T Information Systems, South Plainfield NJ Lines: 17 One of the reasons /bin/sh (bsh to those who like csh) parses lines with ":" in the beginning is because of constructs like the following: : ${FOO:-default} This effectively sets $FOO to a default value if not previously set. The longhand way would be: if [ "${FOO}" = "" ] then FOO=default fi From the hairy eyeball of --- Nick Landsberg ( ....!spuxll!npl)