repo.or.cz
/
cmdllinux.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
cleanup
[cmdllinux.git]
/
scripts
/
_print_last_char.sh
blob
8cfd28ff4d3a6cfe0e64920e1143e4f96d97d8e9
1
[
-z
"
$1
"
] &&
exit
1
2
FILE
=
"
$1
"
3
[ !
-f
"
$FILE
"
] &&
exit
2
4
5
SIZE
=
`stat -c '%s' "
$FILE
"`
6
retval
=
$?
7
[
"
$retval
"
!=
0
] &&
exit
$retval
8
9
[
"
$SIZE
"
-lt
1
] &&
exit
0
10
11
FEND
=
`od -v -A n -t x1 -N 1 -j $(expr
$SIZE
- 1) "
$FILE
"`
12
retval
=
$?
13
[
"
$retval
"
!=
0
] &&
exit
$retval
14
15
echo
$FEND