[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:38:03 +0200 |
mapfile -d '' -t files < <( find .. -print0 )
gawk '..' <( head .. "${files[@]}" )
On Wed, Jul 21, 2021 at 5:33 AM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>
> 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.
> > >
> > >
> > >
> > >
- Printing in red during output from head, lisa-asket, 2021/07/20
- Printing in red during output from head, lisa-asket, 2021/07/21
- Re: Printing in red during output from head, Alex fxmbsw7 Ratchev, 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, Alex fxmbsw7 Ratchev, 2021/07/21
- Re: Printing in red during output from head, Alex fxmbsw7 Ratchev, 2021/07/21
Re: Printing in red during output from head, Chris Elvidge, 2021/07/21