News for hackers. Stuff that matters.
Re:Dd is not a disk writing tool (2015) by RJIb8RBYxzAMX9u on Sunday January 08, 2017 @10:29AM (#13350061)
I was originally going to put that in my examples, but opted to leave it out, because with sh -c you have to think about escaping special characters. Most of the time it doesn't matter, but when running commands as root you ought to be absolutely sure.
Re:Dd is not a disk writing tool (2015) by nerdponx on Sunday January 08, 2017 @09:41PM (#13353586)
What about using a here-doc (as in http://stackoverflow.com/a/16514624/2954547)?

    sudo sh <<EOF
    cat foobar.img > /dev/sdi
    EOF