Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I'm looking for a command on Linux that would let me execute a file as binary, but skipping the first x bytes, so:

$ echo "some text" > file
$ cat /bin/bash >> file
$ ??? file  # should run bash
share|improve this question

1 Answer 1

up vote 1 down vote accepted

this is probably the closest you will get:

dd if=container.txt of=executable bs=<bytes to skip> skip=1
chmod +x executable
./executable
share|improve this answer
    
Not quite was I was hoping for, but I think you're right about it being the best I can do. –  Brendan Long Feb 11 '10 at 23:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.