summaryrefslogtreecommitdiff
path: root/le2bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'le2bin.c')
-rw-r--r--le2bin.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/le2bin.c b/le2bin.c
new file mode 100644
index 0000000..fa31dd7
--- /dev/null
+++ b/le2bin.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdint.h>
+
+int main(int argc, char **argv) {
+ int i;
+ for (i=1; i<argc; i++) {
+ uint32_t n = strtoul(argv[i], NULL, 16);
+ write(STDOUT_FILENO, &n, 4);
+ }
+ return 0;
+}