[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] conditional for file existence?
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] conditional for file existence? |
Date: |
Tue, 15 Jul 2003 23:31:28 +0200 |
User-agent: |
Mutt/1.4i |
> Is there a way to check if a filename names an existent file?
If you don't mind being system dependent (unix-like), you could do
.sy test -f filename/to/be/checked && echo ".ds xx yes" >testresult || echo
".ds xx no" >testresult
.so testresult
and then string "xx" would contain "yes" or "no" depending on
whether the file exited or not.