help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Any way to make ** search the current directory as well


From: Dennis Williamson
Subject: Re: [Help-bash] Any way to make ** search the current directory as well for files with a certain extension?
Date: Thu, 20 Dec 2018 11:11:37 -0500

On Thu, Dec 20, 2018, 11:00 AM Peng Yu <address@hidden wrote:

> Hi,
>
> I could use the following to do so.
>
> printf '%s\n' ** | grep '\.sh$'
>
> But is there a way to get rid off the grep. The following will not
> search for the current directory.
>
>
>

This one works for me:

printf '%s\n' **/*.sh
>
> Of course, one could write like this but it is a little cumbersome.
>
> printf '%s\n' **/*.sh *.sh
>
> Thanks.
>
> --
> Regards,
> Peng
>
>


reply via email to

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