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: Wed, 21 Jul 2021 05:33:35 +0200

that find | .. | gawk without the <<< - was just for testing here

On Wed, Jul 21, 2021 at 5:28 AM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>
> gawk -v ORS= -v RS='<==|==>' 'RT == "==>" { $0 = $0 RT "\33[31m" } RT
> == "<==" { $0 = $0 "\33[m" RT } 1' <<<'==> foo bar <=='$'\nbarbar\n==>
> again <==\nbla'
>
> find | .. | gawk
> gawk <( find .. )
>
> On Wed, Jul 21, 2021 at 3: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"
> >
> >
> >
> > 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]