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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command line pattern matching

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
0
0
I have some files that I want to pattern match on, but I cannot get it to work right.


Test Files (0 byte touched files)

Test_GroupUIDxxx_FILETYPE_SERVER_DATE_NO.tar
Test_GroupUIDyyy_FILETYPE_SERVER_DATE_NO.tar
Test_GroupUID_FILETYPE_SERVER_DATE_NO.tar
Test_GroupUIDtext_FILETYPE_SERVER_DATE_NO.tar
Test_GroupUIDtext2_FILETYPE_SERVER_DATE_NO.tar


The 'Group' and 'UID' are always the same. I want to key off the rest of the text in field 2 (Delimiter '_').

T="Test_GroupUID*[!xxx|yyy]_FILETYPE_SERVER_DATE_NO.tar"

This will bring back entries 4 and 5 from the list above, but it is not matching on entry 3. I would like to keep the command line pattern match over something else if possible.

OS = SunOS 5.8
SHELL = KSH

Thanks in advance.
 
Code:
ls Test_GroupUID!(xxx|yyy)_FILETYPE_SERVER_DATE_NO.tar

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top