Path: utzoo!utgpu!water!watmath!clyde!att!att-ih!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: Picking a character from a word Message-ID: <5031@chinet.UUCP> Date: 28 Apr 88 16:55:27 GMT References: <13125@brl-adm.ARPA> <50995@sun.uucp> <905@cresswell.quintus.UUCP> Reply-To: les@chinet.UUCP (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 13 In article <905@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >is false. But let $string be "-z", and you get an error message! You >would expect that using "-n $string" would eliminate this ambiguity, >but it introduces another: try string="="!. The work-around that I have seen is: if test "X$string" = "X" Now, does someone have an easy way to test if a directory contains any files or not? Les Mikesell