Pergunta

I tried

#!/bin/bash
ls * [!0-9] * .*

but that doesn't work - I still get some files that contain a number.

Foi útil?

Solução

If

shopt extglob

says

extglob         on

then you can try

ls !(*[0-9]*)

Use the following to enable this option

shopt -s extglob

Outras dicas

how about good ol grep like so ... ls | grep -v "[0-9]"

Note: removed the * as suggested by BMW.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top