I'm unable to show JUST ONE file from the output of ls
using bash extended globbing.
From info bash
If the `extglob' shell option is enabled using the `shopt' builtin,
several extended pattern matching operators are recognized. In the
following description, a PATTERN-LIST is a list of one or more patterns
separated by a `|'. Composite patterns may be formed using one or more
of the following sub-patterns:
`?(PATTERN-LIST)'
Matches zero or one occurrence of the given patterns.
`*(PATTERN-LIST)'
Matches zero or more occurrences of the given patterns.
`+(PATTERN-LIST)'
Matches one or more occurrences of the given patterns.
`@(PATTERN-LIST)'
Matches exactly one of the given patterns.
`!(PATTERN-LIST)'
Matches anything except one of the given patterns.
.
shops -s extglob
ls -l /boot/@(vmlinuz*)
-rw-r--r-- 1 root root 1829516 Apr 21 2009 /boot/vmlinuz-2.6.9-89.EL
-rw-r--r-- 1 root root 1700492 Apr 21 2009 /boot/vmlinuz-2.6.9-89.ELsmp
ls -l /boot/?(vmlinuz*)
-rw-r--r-- 1 root root 1829516 Apr 21 2009 /boot/vmlinuz-2.6.9-89.EL
-rw-r--r-- 1 root root 1700492 Apr 21 2009 /boot/vmlinuz-2.6.9-89.ELsmp
How do I show only ONE file?