2 ms·
The point in these examples is that it is often very useful to be able to reuse the previous output to craft another command, or to work in a more iterative way
by sime2009 10y ago
The point in these examples is that it is often very useful to be able to reuse the previous output to craft another command, or to work in a more iterative way by massaging the text and getting feedback along the way.
- bobwaycott 10y agoIsn't that what the pipe operator is for?
- sime2009 10y agoTrue, the classic shell tools like the pipe can do a lot of this. But there are important differences. Firstly, to use the pipe you need to know in advance which output you want to keep/capture when you run the command. (e.g. by redirecting into a tmp file or using a pipe directly.) In this terminal you can decide afterwards if you want to do something else with previous output. Another difference is that this works across tabs, sessions and machines, but the classic pipe doesn't. It makes your interactive shell a lot more interactive. Classic pipes etc still work as expected too, so you are feel to mix and match.