Wildcards in class activity instructions
Before you start
- Run the script
wildcardInClass.sh. Use this command:
curl https://cis106.com/assets/scripts/wildcardInClass.sh | bash
- This will create the directory
inClassActivityin your home directory. It contains all the files and directories we will use.
The asterisk (start) wildcard
- List all the files in the
~/inClassActivity/star/directory in a single column and sorted by entry extension - Create a new directory in
~/inClassActivity/star/calledmyhomeworkand move all the homework files to it. - Remove all the text files in
~/inClassActivity/star/ - Create a new directory in
~/inClassActivity/star/calledNotesand copy all the PDF files with an_in the name to it.
Take a screenshot to submit later in the in-class activity dropbox
The Question mark wildcard
- Change your current working directory to
~/inClassActivity/qmark - Long list all the hidden files in your current working directory with no group, no owner, time-style set to
+%aand human-readable file size. - List all the hidden files in the parent directory (
~/inClassActivity/) - Create a new directory in
~/inClassActivity/qmarkcalledotherand move all the hidden files we listed before to this new directory.
Take a screenshot to submit later in the in-class activity dropbox
The square brackets wildcard
- Change your current working directory to
~/inClassActivity/qmark - List all the
pngfiles that start with a capital letter - List all the
pngfiles that have a lowercase letter before the file extension. - Create a directory called
imgsand move all the files with a full date in the name to it.
Take a screenshot to submit later in the in-class activity dropbox
Brace Expansion
- Create a new directory in
~/inClassActivity/calledbraceand cd into it. - Create the following directory structure inside
brace:
movies/
├── horror
│ ├── classic
│ └── modern
├── romance
│ ├── classic
│ └── modern
└── scifi
├── classic
└── modern
10 directories, 0 files
- Inside
horror,romance, andscifi, create 2 text files using your username as part of the file name. Here is an example of the file’s names: old-list-USERNAME-HERE.lst and new-list-USERNAME-HERE.lst. After the files are created, this is how the tree of the movies directory should look:
movies/
├── horror
│ ├── classic
│ ├── modern
│ ├── new-list-rap.lst
│ └── old-list-rap.lst
├── romance
│ ├── classic
│ ├── modern
│ ├── new-list-rap.lst
│ └── old-list-rap.lst
└── scifi
├── classic
├── modern
├── new-list-rap.lst
└── old-list-rap.lst
10 directories, 6 files
What will you submit for extra credit
- In your cis106 directory/local repository, create a new directory called “ExtraCredit” (One word no spaces in file names pleases!)
- Inside “
ExtraCredit”, create another directory called “extra7” - Open your cis106 directory/local repository in VS Code
- Inside “
extra7” create a markdown file called “extra7.md” - Add all the screenshots to “
extra7.md” using proper markdown syntax and labeling each screenshot using heading 2 formatting. Save the markdown file. - Your markdown document should start with the following heading 1:
# Extra Credit 7: Wildcards 2 - Convert your file to PDF
- Run the github commands, in VS Code Terminal, to push all your changes to github:
gid add .git commit -m "Completed Extra 5"git push
- In blackboard submit the following:
- The URL of
extra7.md - The PDF file
extra7.pdf
- The URL of