shopt -s extglob dotglob globstar
gawk -f my_too_big_thing -v ml=5 **/*@(.@(texi|org))
btw for esc \33 or sometimes \e
On Wed, Jul 21, 2021 at 1:48 PM Chris Elvidge <celvidge001@gmail.com> wrote:
>
> 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
>
>