Which three statements are correct?

A user jack, using a bash shell, requests a directory listing as follows:
jack@solaris: ~ $ 1s
dira dirb dirc diraa dirabc
Which three statements are correct?

A user jack, using a bash shell, requests a directory listing as follows:
jack@solaris: ~ $ 1s
dira dirb dirc diraa dirabc
Which three statements are correct?

A.
The pattern dir? will expand to dira dirb dirc.

B.
The pattern dir*a will expand to diraa.

C.
The pattern dir*a will expand to dira diraa.

D.
The pattern dir*b? will expand to dirabc.

E.
The pattern dir*b? will expand to dirb dirabc.

Explanation:
A: dir followed by a single letter.
C: dir followed by any characters ending with a.
D: dir followed by any characters, then character b, then one single character.
only dirabc matches



Leave a Reply 2

Your email address will not be published. Required fields are marked *


aqeel

aqeel

aqeel@sol-server05:~$ ls
diraa dirc
dirabc
dira dirb
aqeel@sol-server05:~$ ls dir?
dira:

dirb:

dirc:
aqeel@sol-server05:~$ ls dir*a
dira:

diraa:
aqeel@sol-server05:~$ ls dir*b?
aqeel@sol-server05:~$ ls dir*b?
aqeel@sol-server05:~$

A and C are giving the correct result but D and E didn’t.