Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find an Android shell command that is able to read a file but that has the power to skip, for example 512 bytes every 1024 bytes.

Does such a command exist and is available for Android devices?

I have looked at dd documentation but couldn't figure out if it is possible to use dd for that purpose. You make dd skip bytes at the beginning of the file, you can make it read X bytes from a file, but I do not see how to get that feature that I described.


For my purpose the command/script should output to stdout, and the processing will read the output like a stream, so it will not be something like "cat a file, do processing, cat a file". It is like "while true; do cat a file; done | processing".

The list of available commands is here:

share|improve this question

closed as off topic by MaQleod, Diogo, 8088, ChrisF, slhck Oct 3 '12 at 10:19

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Hmm, this is interesting. Something like this might possibly be doable, but I haven't managed to get it to work exactly like this.

while head -c 1536; do
    head -c 1024

cat file | superawesomescript

This seems more definitive to me, but I haven't tested it:


mkfifo fifo
while dd bs=1b count=1536 of=fifo; do
    head -c 1024 fifo | processing
unlink fifo
share|improve this answer
I will try your solutions, right now I am updating the question with more details. – Rui Marques Sep 30 '12 at 11:09

Not the answer you're looking for? Browse other questions tagged .