summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-05-25 14:19:20 -0600
committermo <mo.khan@gmail.com>2019-05-25 14:19:20 -0600
commitb751f56cdfe65b6e78044875cd43178ccac16206 (patch)
treea4e6e55620bf104cda91e048d8c41241a0ca7c06
parent34fe282eb3ed97cc38d9110303c4dd36ace48637 (diff)
use consistent bash prompt
-rw-r--r--README.md67
1 files changed, 33 insertions, 34 deletions
diff --git a/README.md b/README.md
index 71c7200..906c1d8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
-# COMP-325 Assignment 1
-## Mo Khan
+# COMP-325 Assignment 1 - mo khan (3431709)
I have completed this assignment on two different machines.
@@ -27,12 +26,12 @@ mo (mo@mokhan.ca)
7. Give three commands that you can use to list the absolute pathname of your home directory.
```bash
-モ echo $HOME
+$ echo $HOME
/home/mokha
-モ echo ~/
+$ echo ~/
/home/mokha
-モ cd
-モ pwd
+$ cd
+$ pwd
/home/mokha
```
@@ -61,15 +60,15 @@ See `exercises/chapter-7.8`.
The login shell would become the `date` command. The `date` program prints the date. This would print the date and end.
```bash
-も date
+$ date
Wed May 22 20:07:38 MDT 2019
```
10. What are the inode numbers of the root and your home directories on your machine? Give the commands that you used to find these inode numbers.
```bash
-ls -id /
-ls -id $HOME
+$ ls -id /
+$ ls -id $HOME
```
See `exercises/chapter-7.10`.
@@ -77,15 +76,15 @@ See `exercises/chapter-7.10`.
11. Create a directory, called `memos`, in your home directory. Go into this directory and create a file `memo.james` by using one of the editors discussed in Chapter 5. Give three pathnames for this file.
```bash
-bash-3.2$ cd
-bash-3.2$ mkdir -p memos
-bash-3.2$ cd memos/
-bash-3.2$ vim memo.james
-bash-3.2$ ls ./memo.james
+$ cd
+$ mkdir -p memos
+$ cd memos/
+$ vim memo.james
+$ ls ./memo.james
./memo.james
-bash-3.2$ ls ~/memos/memo.james
+$ ls ~/memos/memo.james
/Users/mokha/memos/memo.james
-bash-3.2$ ls /Users/mokha/memos/memo.james
+$ ls /Users/mokha/memos/memo.james
/Users/mokha/memos/memo.james
```
@@ -94,9 +93,9 @@ See `exercises/chapter-7.11`.
15. Give the command for deleting the memos directory. How do you know that the directory has been deleted?
```bash
-bash-3.2$ cd
-bash-3.2$ rm -fr memos/
-bash-3.2$ ls -alh memos
+$ cd
+$ rm -fr memos/
+$ ls -alh memos
```
See `exercises/chapter-7.15`.
@@ -108,7 +107,7 @@ The ^D represents the eof or end of file.
```
```bash
-モ stty -a
+$ stty -a
speed 9600 baud; 14 rows; 238 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
@@ -127,7 +126,7 @@ cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
17. Give a command line to display the types of all the files in your `∼/unix` directory that start with the word chapter, are followed by a digit 1, 2, 6, 8, or 9, and end with .eps or .prn.
```bash
-cd ~/unix && ls . | grep -e 'chapter[12689]\.[eps|prn]' | xargs file
+$ cd ~/unix && ls . | grep -e 'chapter[12689]\.[eps|prn]' | xargs file
chapter1.eps: empty
chapter1.prn: empty
chapter2.eps: empty
@@ -154,7 +153,7 @@ Permission bits are organized as follows:
E.g
```bash
-モ ls -alh README.md
+$ ls -alh README.md
-rw-r--r-- 1 mokha staff 7.8K 18 May 16:20 README.md
```
@@ -170,15 +169,15 @@ How did you obtain your answer?
If used any commands, show the commands and their outputs.
```bash
-モ users
+$ users
mokha
-モ id -Gn
+$ id -Gn
staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2
-モ groups
+$ groups
staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2
-モ groups mokha
+$ groups mokha
staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2
-モ groups root
+$ groups root
wheel daemon kmem sys tty operator procview procmod everyone staff certusers localaccounts admin com.apple.sharepoint.group.1 _appstore _lpadmin _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2
```
@@ -190,11 +189,11 @@ What command did you use to set privileges?
Give another command that would accomplish the same thing.
```bash
-touch test1
-chmod 640 test1
-ls -alh test1
+$ touch test1
+$ chmod 640 test1
+$ ls -alh test1
-rw-r----- 1 mokha staff 0B 18 May 18:16 test1
-chmod u=rw,g=r,o= test1
+$ chmod u=rw,g=r,o= test1
-rw-r----- 1 mokha staff 0B 18 May 18:17 test1
```
@@ -490,7 +489,7 @@ See `src/temperature.c` and `Makefile`.
The compiler error is the following:
```bash
-も make
+$ make
cc -Wall -g -std=c99 -Isrc -c src/temperature.c
src/temperature.c: In function ‘main’:
src/temperature.c:5:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘printf’
@@ -512,7 +511,7 @@ Do you get any errors during compilation?
No. I do get a compiler warning, but not an error.
```bash
-も make
+$ make
cc -Wall -g -std=c99 -Isrc -c src/temperature.c
src/temperature.c: In function ‘main’:
src/temperature.c:9:35: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
@@ -560,7 +559,7 @@ You can use the `time` command.
E.g
```bash
-も time curl -s -I https://www.mokhan.ca/
+$ time curl -s -I https://www.mokhan.ca/
HTTP/2 200
content-type: text/html
content-length: 8017