help-bash
[Top][All Lists]
Advanced

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

Re: how to print all 3 char length string made whitespace {0..9} {a..z}


From: Dennis Williamson
Subject: Re: how to print all 3 char length string made whitespace {0..9} {a..z}
Date: Sun, 2 Aug 2020 15:55:54 -0500

On Sun, Aug 2, 2020, 3:43 PM Peng Yu <pengyu.ut@gmail.com> wrote:

> As I said, I just want to generate all three character strings with
> space, a..z, and 0..9 in bash. Otherwise, I will have to use a
> different programming lang which I don't want to. I don't understand
> why you ask this question.
>
> On 8/2/20, Eli Schwartz <eschwartz@archlinux.org> wrote:
> > On 8/2/20 3:44 PM, Peng Yu wrote:
> >> Hi,
> >>
> >> If it were just {a..z}, `echo {a..z}{a..z}{a..z}` can be used. But I
> >> don't see there is a way to concatenate whitespace, {0..9} and {a..z}.
> >>
> >> Is there a good way to generate all three-character strings made of
> >> whitespace, {0..9} and {a..z}? Thanks.
> >
> > You can always use multiple brace expansions together:
> >
> > $ printf "<%s>\n" {{a..z}," ",{0..9}}
> >
> > Though I'd first want to ask what you're really trying to do...
> > (I know, I know, you'll never tell us...)
> >
> > --
> > Eli Schwartz
> > Arch Linux Bug Wrangler and Trusted User
> >
> >
>
>
> --
> Regards,
> Peng
>


Do you want to generate all 46,620 permutations?

>


reply via email to

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