[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Printing in red during output from head
From: |
lisa-asket |
Subject: |
Re: Printing in red during output from head |
Date: |
Wed, 21 Jul 2021 15:47:03 +0200 (CEST) |
From: Chris Elvidge <celvidge001@gmail.com>
To: help-bash@gnu.org
Subject: Re: Printing in red during output from head
Date: 21/07/2021 13:48:04 Europe/Paris
On 21/07/2021 02:17 am, lisa-asket@perso.be wrote:
> I am using the following command to output the first n lines of matched files.
>
>
>
> find "$fdir" \( -name \*.org -o -name \*.texi \) | xargs head -n "$n"
>
How about:
find "$fdir" -type f -name "*.org" -o -name "*.texi" | xargs head -n
"$n" | sed -e 's/==>/^[[01;31m==>/;s/<==/<==^[[0m/'
Where ^[ is escape (ctrl-v esc)
--
Chris Elvidge
England
- Re: Printing in red during output from head, (continued)
- Re: Printing in red during output from head, Chris Elvidge, 2021/07/21
- Re: Printing in red during output from head, Greg Wooledge, 2021/07/21
- Printing in red during output from head, lisa-asket, 2021/07/21
- Re: Printing in red during output from head, Greg Wooledge, 2021/07/21
- Printing in red during output from head, lisa-asket, 2021/07/21
- Re: Printing in red during output from head, Greg Wooledge, 2021/07/21
- Printing in red during output from head, lisa-asket, 2021/07/21
- Printing in red during output from head, lisa-asket, 2021/07/21
- Re: Printing in red during output from head, Chris Elvidge, 2021/07/21
- Re: Printing in red during output from head, Greg Wooledge, 2021/07/21
Re: Printing in red during output from head,
lisa-asket <=
Re: Printing in red during output from head, Alex fxmbsw7 Ratchev, 2021/07/22
- Re: Printing in red during output from head, Chris Elvidge, 2021/07/22
- Re: Printing in red during output from head, Alex fxmbsw7 Ratchev, 2021/07/22
- Re: Printing in red during output from head, Dennis Williamson, 2021/07/22
- Re: Printing in red during output from head, Alex fxmbsw7 Ratchev, 2021/07/22
- Printing in red during output from head, lisa-asket, 2021/07/22
- Re: Printing in red during output from head, Chris Elvidge, 2021/07/22
- Re: Printing in red during output from head, Greg Wooledge, 2021/07/22
- Re: Printing in red during output from head, Chris Elvidge, 2021/07/22