help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing in red during output from head


From: Alex fxmbsw7 Ratchev
Subject: Re: Printing in red during output from head
Date: Thu, 22 Jul 2021 15:22:23 +0200

sed -r $'s/^(==>)(.*)(<==)$/\e[31m\\1\\2\\3\e[m/g'

On Wed, Jul 21, 2021, 03:17 <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"
>
>
>
> For one file I get
>
>
>
> ==> ./01cuneus/igtdr108/igtdr108.texi <==
> \input texinfo
> @set tlpage-tdr108
> @set fmatr-tdr108
>
> @c %**start of header
> @setfilename Notation.info
> @settitle Notation
> @smallbook
> @finalout
> @c %**end of header
>
> @c Org Mode Commands
> @ignore
>
>
> How can I get the file name (enclosed within ==> and <==) to be coloured
> red
>
> in the command line terminal.
>
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]