You are not logged in.
Pages: 1
ok, I just came across the coolest thing ever... it's actually really inane, but I find it funny when you find out things like this.
so I give it to you in the form of a quiz:
tell me why
$ if test -f /etc/rc.conf
and
$ if [ -f /etc/rc.conf]
are 100% identical.
I'll give you a hint: the only bash builtin is the "if"
Offline
isnt '[' is linked to 'test' thus its actually same thing? i am no bash coder so....
Offline
yup... it's funny that "[" is a symlink to test.... I saw that file sitting there today...
Offline
I thought this was well known. :-P
How come you have more posts than me?
Offline
I thought this was well known. :-P
How come you have more posts than me?
maybe everyone knew but me....
aha! I'm winning... wow, I have alot of posts... *sigh* I'm a loser :oops:
Offline
join the crowd
Offline
actually [ and test are bash builtins
# type test
test is a shell builtin
but /usr/bin/test and /usr/bin/[ may be used if you rely on another simpler shell (ash, ...)
Offline
Pages: 1