diff options
Diffstat (limited to 'doc_src')
-rw-r--r-- | doc_src/if.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc_src/if.txt b/doc_src/if.txt index 0e9a7cb1..1cecdcd3 100644 --- a/doc_src/if.txt +++ b/doc_src/if.txt @@ -30,3 +30,12 @@ else echo foo.txt and bar.txt do not exist end \endfish + +The following code will print "foo.txt exists and is readable" if foo.txt is a regular file and readable +\fish +if begin test -f foo.txt + and test -r foo.txt + end + echo "foo.txt exists and is readable" +end +\endfish |