Oracle
1Z0-821 · Question #68
A user jack, using a korn shell, requests a directory listing as follows: jack@solaris:/export/home/jack $ 1s file filea Filea fileb Fileb filec Filec Which two statements are correct?
The correct answer is A. The pattern [?i]*a will expand to filea Filea. C. The pattern [gfe] * will expand to file filea fileb filec. A: starting with one single character, second character must be letter i, any characters, ending C: starting with letter e, f, or g, followed by anything.
Administering Oracle Solaris 11 OS on a Single System
Question
A user jack, using a korn shell, requests a directory listing as follows:
jack@solaris:/export/home/jack $ 1s file filea Filea fileb Fileb filec Filec Which two statements are correct?
Options
- AThe pattern [?i]*a will expand to filea Filea.
- BThe pattern [fF]*a? will expand to [fF] *a?.
- CThe pattern [gfe] * will expand to file filea fileb filec.
- DThe pattern [g-e] * will expand to file filea fileb filec.
- EThe pattern [fF] [a-zA-z] i*e will expand to file.
How the community answered
(51 responses)- A82% (42)
- B4% (2)
- D2% (1)
- E12% (6)
Explanation
A: starting with one single character, second character must be letter i, any characters, ending C: starting with letter e, f, or g, followed by anything.
Topics
#shell globbing#Korn shell#filename expansion#pattern matching
Community Discussion
No community discussion yet for this question.