I'm suppose to write a command that would list all files that end in .tx with an optional t at the end.
So far all I got is listing the files that end in .tx which is:
ls *.tx
Now my problem is how do I add the optional t at the end.
I'm suppose to write a command that would list all files that end in .tx with an optional t at the end.
So far all I got is listing the files that end in .tx which is:
ls *.tx
Now my problem is how do I add the optional t at the end.
Try:
ls *.tx *.txt
Try:
[s]```text
ls *.tx[t]
EDIT:
Oops, was too certain it would work.
Try this instead:
```text
ls *.{tx,txt}
hth
Note: brace expansion ( {foo,bar}
) is supported by bash/ksh93/zsh