help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnu Make 3.79.1 - gives errors while removing files i.e. using make


From: Michael Elizabeth Chastain
Subject: Re: Gnu Make 3.79.1 - gives errors while removing files i.e. using make clean
Date: Sun, 23 May 2004 09:36:02 -0400 (EDT)

Hi Yashesh,

> My question is why do I get an error when I'm checking to see if the
> file foo1 exists first before calling rm ?

Your command is:

        test -e foo1 && rm foo1

The "test" command returns false, so the whole command fails.

You need something like:

  if [ test -e foo1 ]; then rm foo1; else true; fi

Michael C




reply via email to

[Prev in Thread] Current Thread [Next in Thread]