Re: Editing a piped in stream?

2018-07-10 Thread john doe
On 7/10/2018 2:16 PM, mick crane wrote: On 2018-07-08 17:41, John Darrah wrote: On 7/8/2018 7:00 AM, Richard Owlett wrote: Until this thread I didn't have concept of "stream editor", much less the existence of "sed". I had heard of "AWK", but had an image of it being a regex parser. Awk is

Re: Editing a piped in stream?

2018-07-10 Thread mick crane
On 2018-07-10 13:31, Greg Wooledge wrote: On Tue, Jul 10, 2018 at 01:16:09PM +0100, mick crane wrote: I'd like to learn some awk having found it handy once. apt says mawk is installed in /usr/bin I have lrwxrwxrwx 1 root root 21 Apr 2 22:29 awk -> /etc/alternatives/awk -rwxr-xr-x 1

Re: Editing a piped in stream?

2018-07-10 Thread mick crane
On 2018-07-08 12:18, Andy Smith wrote: Hello, On Sun, Jul 08, 2018 at 07:39:07AM +0200, john doe wrote: The issue here is that we don't know what the OP wants A situation sadly familiar when dealing with this particular poster's threads. Also in the general case, if you ever find yourself pa

Re: Editing a piped in stream?

2018-07-10 Thread Greg Wooledge
On Tue, Jul 10, 2018 at 01:16:09PM +0100, mick crane wrote: > I'd like to learn some awk having found it handy once. > apt says mawk is installed > > in /usr/bin I have > lrwxrwxrwx 1 root root 21 Apr 2 22:29 awk -> /etc/alternatives/awk > -rwxr-xr-x 1 root root 658072 Jan 25 12:55

Re: Editing a piped in stream?

2018-07-10 Thread mick crane
On 2018-07-08 17:41, John Darrah wrote: On 7/8/2018 7:00 AM, Richard Owlett wrote: Until this thread I didn't have concept of "stream editor", much less the existence of "sed". I had heard of "AWK", but had an image of it being a regex parser. Awk is easy to learn because it is a minimal la

Re: Editing a piped in stream?

2018-07-09 Thread Greg Wooledge
On Sun, Jul 08, 2018 at 07:39:07AM +0200, john doe wrote: > The issue here is that we don't know what the OP wants (original and desired > output)!!! :) Indeed. That's nearly always the problem (not just with this individual). https://mywiki.wooledge.org/XyProblem https://mywiki.wooledge.org/Par

Re: Editing a piped in stream?

2018-07-08 Thread John Darrah
On 7/8/2018 7:00 AM, Richard Owlett wrote: Until this thread I didn't have concept of "stream editor", much less the existence of "sed". I had heard of "AWK", but had an image of it being a regex parser. Awk is easy to learn because it is a minimal language. It can do anything sed can do and

Re: Editing a piped in stream?

2018-07-08 Thread Richard Owlett
On 07/08/2018 08:12 AM, Richard Owlett wrote: [snip] In some threads I'm chided for lack of details. In this and other threads I lose for giving too many. Y'all will have admit that I did say "Subject line is poorly phrased." Having read the responses, my subject line my not be all that bad. A

Re: Editing a piped in stream?

2018-07-08 Thread Richard Owlett
On 07/08/2018 06:18 AM, Andy Smith wrote: Hello, On Sun, Jul 08, 2018 at 07:39:07AM +0200, john doe wrote: The issue here is that we don't know what the OP wants A situation sadly familiar when dealing with this particular poster's threads. Also in the general case, if you ever find yourself

Re: Editing a piped in stream?

2018-07-08 Thread Andy Smith
Hello, On Sun, Jul 08, 2018 at 07:39:07AM +0200, john doe wrote: > The issue here is that we don't know what the OP wants A situation sadly familiar when dealing with this particular poster's threads. Also in the general case, if you ever find yourself parsing the output of "ls", you will probab

Eureka;/ Re: Editing a piped in stream?

2018-07-08 Thread Richard Owlett
On 07/07/2018 08:33 PM, David Wright wrote: On 07/06/18 09:17, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had:     ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' > data.txt I would then manually edit data.txt by replaci

Re: Editing a piped in stream?

2018-07-07 Thread john doe
On 7/8/2018 3:38 AM, John Crawley wrote: On 2018-07-08 04:35, David Christensen wrote: On 07/07/18 01:51, John Crawley wrote: On 2018-07-07 11:02, David Christensen wrote: On 07/06/18 09:17, Richard Owlett wrote: While working on a problem {solved by a different approach} I had:     ls -l /de

Re: Editing a piped in stream?

2018-07-07 Thread John Crawley
On 2018-07-08 04:35, David Christensen wrote: On 07/07/18 01:51, John Crawley wrote: On 2018-07-07 11:02, David Christensen wrote: On 07/06/18 09:17, Richard Owlett wrote: While working on a problem {solved by a different approach} I had:     ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' dat

Re: Editing a piped in stream?

2018-07-07 Thread David Wright
On Sat 07 Jul 2018 at 12:35:02 (-0700), David Christensen wrote: > On 07/07/18 01:51, John Crawley wrote: > >On 2018-07-07 11:02, David Christensen wrote: > >>On 07/06/18 09:17, Richard Owlett wrote: > >>>Subject line is poorly phrased. > >>>While working on a problem {solved by a different approac

Re: Editing a piped in stream?

2018-07-07 Thread David Christensen
On 07/07/18 01:51, John Crawley wrote: On 2018-07-07 11:02, David Christensen wrote: On 07/06/18 09:17, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had:     ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would t

Re: Editing a piped in stream?

2018-07-07 Thread John Crawley
On 2018-07-07 11:02, David Christensen wrote: On 07/06/18 09:17, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had:     ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would then manually edit data.txt by replacing

Re: Editing a piped in stream?

2018-07-06 Thread David Christensen
On 07/06/18 09:17, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had:    ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would then manually edit data.txt by replacing the space character between the two fields wit

Re: Editing a piped in stream?

2018-07-06 Thread Richard Owlett
On 07/06/2018 11:46 AM, Michael Wagner wrote: On Jul 06, 2018 um 11:17:56, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had: ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would then manually edit data.txt by

Re: Editing a piped in stream?

2018-07-06 Thread john doe
On 7/6/2018 6:17 PM, Richard Owlett wrote: Subject line is poorly phrased. While working on a problem {solved by a different approach} I had:    ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would then manually edit data.txt by replacing the space character between the two fields w

Re: Editing a piped in stream?

2018-07-06 Thread Michael Wagner
On Jul 06, 2018 um 11:17:56, Richard Owlett wrote: > Subject line is poorly phrased. > While working on a problem {solved by a different approach} I had: >ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt > I would then manually edit data.txt by replacing the space character between > th

Editing a piped in stream?

2018-07-06 Thread Richard Owlett
Subject line is poorly phrased. While working on a problem {solved by a different approach} I had: ls -l /dev/disk/by-label/ | cut -f 10,12 -d ' ' data.txt I would then manually edit data.txt by replacing the space character between the two fields with a tab. I suspect I should be able to do