Skip to content

Commit fff437b

Browse files
committed
Complete chapter 15 exercises
1 parent 03dd93e commit fff437b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

chapter_15/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Exercises for Chapter 15
2+
3+
**1. Download the code for the port driver given earlier and test it.**
4+
5+
Nothing needed for this exercise.
6+
7+
**2. Download code for a linked in driver and test it on your system**
8+
9+
The book says to download drivers from git://github.com/erlang/linked_in_drivers.git but this repository no longer exists.
10+
11+
**3. Find an operating system command to discover what kind of CPU your computer has. Write a function that returns your CPU type using the `os:cmd/1`**
12+
13+
Solution in the `exercise_3/` directory.
14+
15+
```
16+
erlc cpu_info.erl
17+
erl
18+
1> cpu_info:get().
19+
[{"Architecture","x86_64"},
20+
{"CPU op-mode","32-bit, 64-bit"},
21+
{"Model name","Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz"},
22+
...
23+
2> cpu_info:get("Model name").
24+
"Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz"
25+
```

0 commit comments

Comments
 (0)