On 14/03/2008, at 8:31 PM, Richard Toohey wrote:
On 14/03/2008, at 8:15 PM, Erwin van Maanen wrote:
if [ X"${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then
Now i have no clue what " -a -f " does (anyone care to point me to
the right
manual?)
[cut]
man test
-f file True if file exists and is a regular file.
expression1 -a expression2
True if both expression1 and expression2 are true.
Apologies to all who know this already - but I wondered about that
[ file
for ages until I was enlightened.
So, if you are wondering why man test ... at the top of the man page:
SYNOPSIS
test expression
[ expression ]
(See the square brackets?) And if you look in /bin:
$ ls -l /bin
total 13652
-r-xr-xr-x 2 root bin 79136 Aug 29 2007 [
[cut]
-r-xr-xr-x 2 root bin 79136 Aug 29 2007 test
man [ will take you to the test man page.
See, for example:
http://developer.apple.com/documentation/OpenSource/Conceptual/
ShellScripting/shell_scripts/chapter_2_section_10.html#//apple_ref/
doc/uid/TP40004268-CH237-SW4