![](https://seccdn.libravatar.org/avatar/b12cfb65ca4faebc3e3aac17838e8f8d.jpg?s=120&d=mm&r=g)
Hylton, On Wednesday 10 November 2004 11:02, Steve wrote:
Hylton Conacher (ZR1HPC) wrote:
Hi,
On some occasions I have had to type a very long command that is not in the history file or access multiple file with a common character.
ie files aa, ab, ac, ad, ae, af
What character could I use to simulate wild cards similar to the DOS * ie
...
Is there any reason * won't work for you here?
* matches 0 or more characters. Ie, a* would match a, ab, abc, and abcd. ? matches 1 character. Ie, a? would match ab, ac, aa, etc, but not a, abc or abcd.
- * matches 0 or more occurrences of any character (as Steve said) - ? matches exactly one occurrence of any character - [abc] [A-Z] Matches once occurrence of any of the characters enclosed in square brackets. Ranges (based on unicode character codes) are denoted with hyphens. To get a hyphen, place it first. The character class is inverted if the first character is the up-arrow, '^'. Keep in mind, too, that there is a way to generate arguments that are not tied to file names, as the aforementioned "glob" patterns are. To do this, use the {curly,brace} notation: % echo left-{middle1,middle2,middle3}-right left-middle1-right left-middle2-right left-middle3-right This notation can be nested, too: % echo left-{middle{1,2,3}}-right left-middle1-right left-middle2-right left-middle3-right
Steve
Randall Schulz