Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
5f8daeeb
Commit
5f8daeeb
authored
Jan 31, 2017
by
neilpang
Browse files
minor, a better hex_dump
parent
d78ba322
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
5f8daeeb
...
@@ -344,11 +344,7 @@ _is_solaris() {
...
@@ -344,11 +344,7 @@ _is_solaris() {
#input:"abc"
#input:"abc"
#output: " 61 62 63"
#output: " 61 62 63"
_hex_dump
()
{
_hex_dump
()
{
if
_is_solaris
;
then
od
-A
n
-v
-t
x1 |
tr
-d
"
\r\t
"
|
tr
-s
" "
|
sed
"s/
$/
/"
|
tr
-d
"
\n
"
od
-A
n
-v
-t
x1 |
tr
-d
"
\r\n\t
"
|
tr
-s
" "
|
tr
-d
"
\n
"
else
od
-A
n
-v
-t
x1 |
tr
-d
"
\r\n\t
"
|
tr
-s
" "
|
sed
"s/
$/
/"
|
tr
-d
"
\n
"
fi
}
}
#url encode, no-preserved chars
#url encode, no-preserved chars
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment