Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-09-03 Thread David Wright
On Tue 03 Sep 2019 at 09:49:45 (-0400), Greg Wooledge wrote: > On Sat, Aug 31, 2019 at 06:49:38PM -0500, David Wright wrote: > > Exactly; so > > cat afile | some-filter … > > is just the degenerate of the general case > > cat somefiles* | some-filter … > > where there happens to be only one

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-09-03 Thread Greg Wooledge
On Sat, Aug 31, 2019 at 06:49:38PM -0500, David Wright wrote: > Exactly; so > cat afile | some-filter … > is just the degenerate of the general case > cat somefiles* | some-filter … > where there happens to be only one filename matching somefiles*. > So if you start prototyping some complic

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread David
On Sun, 1 Sep 2019 at 00:39, The Wanderer wrote: > On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: > > On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > >> On 2019-08-31 at 09:02, Roberto C. Sánchez wrote: > >> > >>> The only time you need to change the syntax is to add something >

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread David Wright
On Sat 31 Aug 2019 at 11:19:38 (-0400), Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 10:02:43AM -0500, David Wright wrote: > > On Sat 31 Aug 2019 at 10:07:01 (-0400), Roberto C. Sánchez wrote: > > > On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > > > > > > > It also loses an

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread David Wright
On Sat 31 Aug 2019 at 11:31:34 (-0400), Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 10:26:34AM -0500, David Wright wrote: > > On Sat 31 Aug 2019 at 11:11:43 (-0400), Roberto C. Sánchez wrote: > > > On Sat, Aug 31, 2019 at 10:39:00AM -0400, The Wanderer wrote: > > > > On 2019-08-31 at 10:07,

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread The Wanderer
On 2019-08-31 at 11:56, Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 11:38:59AM -0400, The Wanderer wrote: >> Just because I only type the command once doesn't mean that I want >> to type a more complex command than I need to. > > Whereas I'd rather front-load the complexity for the repea

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread tomas
On Sat, Aug 31, 2019 at 11:56:48AM -0400, Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 11:38:59AM -0400, The Wanderer wrote: [...] > > I don't suppose you know of any shells which have that behavior, even as > > an option? > > > I am not aware of such a shell, though I have a vague recoll

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread Roberto C . Sánchez
On Sat, Aug 31, 2019 at 11:38:59AM -0400, The Wanderer wrote: > > I don't think I'd prefer it, because it would mean I'd have to remember > where I left the cursor last time rather than being able to just assume > it will always be in a particular position, but I can see that being > just a result

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread The Wanderer
On 2019-08-31 at 11:38, The Wanderer wrote: > On 2019-08-31 at 11:11, Roberto C. Sánchez wrote: >> Don't misunderstand me. I sometimes start interactive command >> lines with 'cat' followed by a pipe. When I do that it is out of >> convenience more than anything else. However, if I am writing

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread The Wanderer
On 2019-08-31 at 11:11, Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 10:39:00AM -0400, The Wanderer wrote: > >> On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: >> >> I actually think this is good behavior. The only obvious places to >> put the cursor when doing command history are at th

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread Roberto C . Sánchez
On Sat, Aug 31, 2019 at 10:26:34AM -0500, David Wright wrote: > On Sat 31 Aug 2019 at 11:11:43 (-0400), Roberto C. Sánchez wrote: > > On Sat, Aug 31, 2019 at 10:39:00AM -0400, The Wanderer wrote: > > > On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: > > > > > > I actually think this is good beha

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread David Wright
On Sat 31 Aug 2019 at 11:11:43 (-0400), Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 10:39:00AM -0400, The Wanderer wrote: > > On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: > > > > I actually think this is good behavior. The only obvious places to put > > the cursor when doing command h

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread Roberto C . Sánchez
On Sat, Aug 31, 2019 at 10:02:43AM -0500, David Wright wrote: > On Sat 31 Aug 2019 at 10:07:01 (-0400), Roberto C. Sánchez wrote: > > On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > > > > > It also loses an important benefit when building and tweaking such > > > pipelines by hand:

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread Roberto C . Sánchez
On Sat, Aug 31, 2019 at 10:39:00AM -0400, The Wanderer wrote: > On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: > > I actually think this is good behavior. The only obvious places to put > the cursor when doing command history are at the beginning of the line > and at the end, and for convenienc

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread David Wright
On Sat 31 Aug 2019 at 10:07:01 (-0400), Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > > On 2019-08-31 at 09:02, Roberto C. Sánchez wrote: > > > > > The only time you need to change the syntax is to add something > > > before sed. But then, that's why

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread The Wanderer
On 2019-08-31 at 10:07, Roberto C. Sánchez wrote: > On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > >> On 2019-08-31 at 09:02, Roberto C. Sánchez wrote: >> >>> The only time you need to change the syntax is to add something >>> before sed. But then, that's why shells have I/O r

Re: cat and pipelines, mostly (was Re: Delete all after a pattern)

2019-08-31 Thread Roberto C . Sánchez
On Sat, Aug 31, 2019 at 09:26:49AM -0400, The Wanderer wrote: > On 2019-08-31 at 09:02, Roberto C. Sánchez wrote: > > > The only time you need to change the syntax is to add something > > before sed. But then, that's why shells have I/O redirection: > > > > (sed 's/config=.*$/config=/g' | tr -d