Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

single metacharacter wildcard

Status
Not open for further replies.

Stumpr

Technical User
Jan 2, 2004
1,178
US
Whatis the AIX equivalent for the standard UNIX metacharacter "?" as a single character wildcard?



Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939
 
Its the same in AIX!

Code:
? Wildcard
Use the ? to match any one character. The ? means any single character.

To refer to only the files that start with file and end with a single character, use:

file?
The files selected would be: file1 file2 file3

To refer to only the files that start with file and end with any two characters, use:

file??
The file selected would be: file10


Regards,
Khalid
 
In what context?

In most regular expression variants (awk,perl,egrep), the '?' metacharacter means "zero or 1 of the preceding character or subexpression".

The single character wildcard is typically '.'.

Please provide an example of your use of '?' that works on some other Unix, but not in AIX.

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Thanks, its the same for standard UNIX. I didn't have a current login and I just wanted to make sure it was the same.

Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top