سؤال

I tried

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

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

هل كانت مفيدة؟

المحلول

If

shopt extglob

says

extglob         on

then you can try

ls !(*[0-9]*)

Use the following to enable this option

shopt -s extglob

نصائح أخرى

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

Note: removed the * as suggested by BMW.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top