Re: [SLUG] Bash Help Needed

From: Eben King (eben01@verizon.net)
Date: Sat May 17 2008 - 14:42:51 EDT


On Sat, 17 May 2008, Michael Fisher wrote:

> On Sat, May 17, 2008 at 1:37 PM, James Forte <james@magna.net> wrote:
>
>> quote the $1 as in "$1"

> I tried putting the $1 in double quotes ("$1") and tried the but no
> luck...would it be easier to determine if the argument ($1) exists or not?
> If so, how would I do that?

if [ "z$1" = z ] ; then
     printf "$1 is blank"
else
     printf "$1 is not blank"
fi

-- 
-eben     QebWenE01R@vTerYizUonI.nOetP     http://royalty.mine.nu:81
An ASCII character walks into a bar and orders a double. "Having a bad
day?" asks the barman. "Yeah, I have a parity error," replies the ASCII
chrcter. The barman says, "Yeah, I thought you looked a bit off." - Skud
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:51:24 EDT