-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the functionality of xxd #4
Comments
It is very easy to get xxd for CentOS, just do as root: On the other hand I support your idea to replace xxd with standard shell code sequence. The problem with your code that it runs only on recent bash. It does not run on ksh, not even talking about xpg4 or svr4 standard only shells. I already made effort to backport my code to support Tru64 UNIX and Solaris. |
27 M vim-common installation size for using only this function? This was the reason to think about an alternative. You are right, the code is developed and tested for the bash shell. I concentrate on RedHat/CentOS. And this code is an example. The development state is from 2016. In the meanwhile I develop shell code under consideration of POSIX (mostly, sometimes it's a hard business). What I can see immediately is the command
I will revise this part. |
|
It's a command construction to expand a substring of a given parameter: The parameter is in our case To substitute this under consideration of POSIX we can maybe use a construction like this:
And within the test function __hex2string2 ():
The call sequence is:
For sure it's not the be-all and end-all. In this example for example the command construction takes always the whole length of the parameter Further ideas? |
That is very good. I think the other problem is harder. Do we have to do some hexadecimal -> octal math? |
I committed the fix: 1f408c5 |
I just love scripting in Linux... 😍 Two alternatives which seem to solve this issue and run also in
|
xxd is hard to get in distributions like CentOS.
Maybe it's better to include an alternative functionality like this:
The usage is for example in the function key_get_modulus():
The text was updated successfully, but these errors were encountered: