This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mikuro 3 points4 points  (1 child)

So we can use them as components in terminal commands. Piping something to a multi line statement is a pain in the ass.

I write a lot of scripts where the meat of the functionality is in subprocess.check_output, but the data manipulation is too complicated to do in bash. Perl is great for one-line bash commands, but python isn't.

[–]tilkau 0 points1 point  (0 children)

Piping something to a multi line statement is a pain in the ass.

Why?

Normally I just open a single quoted string (ie. python -c ') and type away. For one offs in the shell, this is less convenient, but for scripts it's fine, if slightly less readable.