私はこのファイル構造を持っています
user@laptop:/my/folder$ ls
control changelog patches postrm source
copyright.in mime postinst rules
名前にドットを含まないすべてのファイルをリストしたい。grep を使用したくありません。逆は次のようになります。
user@laptop:/my/folder$ ls *[.]*
copyright.in
しかし、目標を達成するために否定 (^ または !) を追加しようとすると、うまくいきません。
user@laptop:/my/folder$ ls *[^.]*
control copyright.in changelog mime postinst postrm rules
patches:
series 03-include-unistd-for-kfreebsd
01-manpages-in-section-1-not-in-section-1l 04-unzip60-alt-iconv-utf8
02-branding-patch-this-is-debian-unzip 04-unzip60-alt-iconv-utf8~
source:
format
出力には copyright.in がリストされていますが、これは私が望むものではありません。私が書くときは?? * の代わりに動作します。
user@laptop:/my/folder$ ls *[^.]??
control changelog mime postinst postrm rules
patches:
series 03-include-unistd-for-kfreebsd
01-manpages-in-section-1-not-in-section-1l 04-unzip60-alt-iconv-utf8
02-branding-patch-this-is-debian-unzip 04-unzip60-alt-iconv-utf8~
source:
format
グロビングを使用して、名前にドットを付けずにディレクトリ内のファイルのリストを作成する方法を知っている人はいますか?