3 ms·
> except with a script, its savable and much easier to type. That's an odd thing to say as Python scripts are no more savable than shell scripts. Nor are Pyth
by gnaritas 13y ago
> except with a script, its savable and much easier to type.
That's an odd thing to say as Python scripts are no more savable than shell scripts. Nor are Python scripts any easier to type than shell scripts. Also, as shell scripts tend to pipe commands together, it's multiple process and thus multiple core by default, unlike Python.
- the_cat_kittles 13y agoI wasn't thinking of making them a shell script, I was thinking of using them directly from the prompt- that makes sense. Come to think of it, I should be writing more shell scripts instead of retyping stuff into the prompt.
- goldfeld 13y agoYeah, that's like saying Python sucks for scripting because all your work in the REPL won't be saved. Goes both ways.
- zokier 13y agoThat's why ipython is so nice :)
- williamcotton 13y agoOr better yet, use make.
- reustle 13y agoI could be wrong, but doesn't each piped command wait for the previous one to finish (not multi-core)?
- buerkle 13y agoNo, try this in a command line: sleep 2 | echo hi
- gnaritas 13y agoNo, a pipe ties the output stream of one command to the input stream of another. That means each line of data travels through the pipe separately allowing all processes to run concurrently.
- gizmo686 13y agoNo, both commands run at the same time. What pipe does is pipe the stdout of one command into the stdin of the other command. Occasionally buffering gives the impression of waiting, as many commands will detect that they are being piped (as opposed to outputting straight to a terminal), and not actually send anything to stdout until either they are finished, or they fill the buffer.