by solarkraft · 3y ago · 0 comments
A common argument in defense of its weirdness is that "shell scripting isn't like serious software development", but I don't understand that either.
I use shell scripts a good amount because "it's right there" is a strong argument, but in a lot of cases things that seem like they would be trivial take forever, are horribly hacky and leave me wishing I just had written a Python script right away instead.
I really don't get why people like shell scripts.
For example: you need to write an image to a USB stick. Python: pretty lengthy BASH: image > /dev/SDA
Both will do exactly the same, but one is a few lines of python the other just one line in bash.
Also it's not right. You need to do something like image.img <cat> /dev/sda
Did this look like a proper bash command to you?! Maybe that was some runable python code?!
File ending has nothing to do with its contents. Image.img could be an mp3.
Stop hairsplitting.
Why would anyone write an mp3 to a block device bit by bit
dd if=<image> of=<output device> bs=<block size>
I use this whenever I need to bake an image to a USB stick.Turns out my answer was wrong too :D. Should have been <image.img cat >/dev/sda. Oh well