Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
viraptor
on May 4, 2015
|
parent
|
context
|
favorite
| on:
PHP: md5('240610708') == md5('QNKCDZO')
Well, either in the example. Parent was saying "Reminds me on bash"
For sh version, I'd go with super-safe:
if test "x$1" = "x$2"
seanp2k2
on May 4, 2015
[–]
If you're doing that, even better to use "x${1}" to be safer. Also, conditional expressions ( [[ instead of [ or `test`) are generally a bit more well-behaved. See
http://wiki.bash-hackers.org/syntax/ccmd/conditional_express...
for more info.
viraptor
on May 4, 2015
|
parent
[–]
But [[ is a bashism - it won't work on bare sh.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
For sh version, I'd go with super-safe: