It's UWAweek 10 (1st semester, week 2)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 3 other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
4:08am Sat 7th Oct, Christopher M.

ANONYMOUS wrote:

"The wildcard characters *, ?, [ ], and { } are widely supported."

That's a general statement that different shells will support slightly different syntaxes to offer filename expansion. The function glob2regex() provided for this project supports only a very basic subset of what shells broadly support (with very little error checking).

I understand how the '*' wildcard works from personal usage but not the rest. I've found some online information with my partner that I believe defines how to use the '?' wildcard correctly.

Here's some short links links about the common ones in the standard shell ````bash``` :

https://linuxg.net/bash-wildcards-question-mark-and-asterisk/ https://linuxg.net/bash-wildcards-the-square-brackets-and-the-curly-brackets/ https://linuxg.net/the-bash-wildcards-practical-examples/

I want to ask you (Chris) how you're expecting these work because I could go by any online definition I come across but it may not be the same as what standard you have and will be marking with.

Your project is not expected to validate or support all the types of wildcards supported by shells (we could possibly use the function described by man 3 glob but it's not the focus of the project). Simply take the result from a successful call to glob2regex() and use regcomp() and regexec() to match, or otherwise, each filename that your program locates.

Your project will not be tested with anything more complex than *.c, a???.txt, or *.[ch], but your code to match patterns will not be dependent, or have to consider, the glob patterns provided.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy