-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
408ac27
commit 1c0d3fb
Showing
3 changed files
with
64 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
### Assignment 1 | ||
|
||
**Basic commands** | ||
|
||
1. Create a working directory for today's class. | ||
2. Within that directory, create a temporary test directory. | ||
3. Create a file using one method I showed you. | ||
4. Create a file using a different method I showed you. | ||
5. Rename one of the files. | ||
6. Copy one of the files. | ||
7. Delete one of the files. | ||
8. Delete the temporary directory. | ||
|
||
**Working with commands** | ||
|
||
1. Learn more about a command you just learned using a unix command. | ||
2. Learn more about a command you just learned using Google. | ||
3. Find out where the commands `mv` and `cp` are located on your computer. | ||
4. Get a list of the commands you've typed already. | ||
5. See which processes are running on your computer. | ||
6. What happens when you type Tab in the middle of a command? | ||
7. What happens when you type Tab in the middle of a file name or path? | ||
|
||
**Setting up your bash environment** | ||
|
||
1. Download the text editor [Sublime Text](https://www.sublimetext.com). | ||
2. Customize your terminal by editing `.profile` or `.bashrc` using Sublime Text. | ||
3. Source your bash profile file using `source ~/.profile`. | ||
4. Open a new terminal to make sure it automatically sources your bash profile file. You may have to change the preferences in the Terminal app. | ||
|
||
**More commands** | ||
|
||
1. Print the first 5 lines of a text file. | ||
2. Print the last 10 commands you entered. | ||
3. View the contents of a file without printing anything to the screen. | ||
4. Open a file in its designated application. | ||
5. Determine the kind/type of a file. | ||
6. Search for a word in a file. | ||
7. Get only the third column of a tab-delimited file.[^1] | ||
8. Using a different method, get the first field of a tab-delimited file and save it as a new file. | ||
|
||
[^1]: To insert a Tab character, type Ctrl-V and then Tab. | ||
|
||
**Paths and variables** | ||
|
||
1. Navigate to root and home directories using absolute paths. | ||
2. Navigate to root and home directories using relative paths. | ||
3. Store an integer as a shell variable then print it. | ||
4. Store a file name as a shell variable. | ||
5. Print your current path variable. | ||
6. Print your home directory. | ||
7. Write a `for` loop to count to 10. | ||
|
||
**Executing bash scripts and dot-files** | ||
|
||
1. Write a bash script that uses the commands `mkdir`, `cat`, `mv`, `echo`, and a `for` loop. | ||
2. Execute you bash script using the terminal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters