5
votes
1answer
36 views

Representing/quoting NUL on the command line

Can \0 be used on the command line? Background For testing corner cases in GNU Parallel I was curious whether all characters were correctly quoted on the command line. Most of them are: perl -e ...
6
votes
2answers
277 views

In an empty environment, how are executables found?

For experimentation purposes I created a binary that prints the $PATH, and calls which as follows: #include <stdlib.h> #include <stdio.h> int main() { char *path = getenv("PATH"); ...
1
vote
2answers
389 views

How can I make awk on Busybox treat the entire input with NULL character in between as a single record?

I wrote a base64 encode script for my Busybox system. #!/bin/sh base64encode() { /usr/bin/awk -- ' function asc(char,l_found) { l_found=0; for (i=0;i<=255;i++){ if ...
2
votes
1answer
844 views

skype not found on Oneiric 64, but it is right there [duplicate]

Possible Duplicate: Can't execute some binaries in chroot environment (zsh: Not found) I have something weird here. Cannot find a file although it is right there. $ skype command not ...
8
votes
2answers
7k views

How can I handle raw binary data in a bash pipe?

I have a bash function that takes a file as a parameter, verifies the file exists, then writes anything coming off stdin to the file. The naive solution works fine for text, but I am having problems ...
13
votes
5answers
16k views

Shell: How to read the bytes of a binary file and print as hexadecimal?

In shell, how can I read the bytes of a binary file I have, and print the output as hexadecimal numbers?