repo.or.cz
/
viking
/
guyou.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add missing trailing dot in sentences
[viking/guyou.git]
/
test
/
check_md5_hash.sh
blob
2396617770e1675d11b8f5e989916b6cf2b889d4
1
#!/bin/sh
2
# Copyright: CC0
3
test_string
=
"Test hash of this string"
4
5
expected_result
=
$
(
echo -n
"
$test_string
"
|
md5sum
|
awk
'{print
$1
}'
)
6
my_result
=
$
(
.
/
test_md5_hash
"
$test_string
"
)
7
8
if
[
"
$my_result
"
=
"
$expected_result
"
];
then
9
# Success
10
exit
0
11
else
12
exit
1
13
fi