Sei sulla pagina 1di 3

Translation for the exams

Task 1 : Order the command to the right functions


1. subdirectory
2. deleting file
3. change to another directory
4. show path of the current directory
5. rename file/directory
6. delete directory
7. copy a file
8. show or present a calendar
9. create a blank file
10. option-controlled counting

Task 2 : Bash Scripting


1) Specify command lines by which the values of the following calculation
can be performed
(a) Specify a command line expression (= an input) to get the value of
3 × 7 + 5 to calculate.
(b) Specify the command line expressions to add 8 to the variable y.
then assign the value of y + 2 to the variable x, and finally
to output the value of x.

2) Indicate how the following conditions are solved by using test in one
if ... then formulate case distinction. The first entry serves as an example. In
the conditional letters a, b, c stand for variables.
Bedingung test

Bsp. a == 3 if test $a -eq 3

a) b ≤ 42

b) b == ”demo”

c) a is not a directory

d) The script does not have 3 call parameters

e) a > 0 und b == 2
3) Try to complete the script
Fill in the enclosed script zaehlen.sh so that it contains the number of words for each line
Something like this:

1 > ./zaehlen.sh

2 7: wenige zwei drei fuenf viele schoene wichtige

3 5: gelbe gruene rote blaue kleine

4 3: Kugeln Baelle Tassen

5 1: wurden

6 3: gestern erfolgreich versehentlich

7 4: versendet eingepackt verschenkt benutzt

The shell script is in the zip file – no need to translate I think just to count the words like in the
example.

Task 3: GNU PLOT

1) Try to get as close to the following graphic as possible


One last time histograms.

Graph on the sheet

Note: You can set the X-Tics correctly using set xtics rotate out, except
you can do this instead of e.g. rowstacked use the following: set style histogram clustered.
Furthermore, you only need the one to fourth column of the right to plot here
File date_mins.data.

2) Try to get as close to the following graphic

Graph on the sheet

Note: You saw at plot in the event with lines. For this task
There are two more commandos with impulses and with points that you
have to use. Furthermore, you only need the second and fourth to plot correctly here
Column of the file using.dat.

3) Try to get as close to the following graphic

Graph on the sheet.

Note: You saw at plot in the event with lines. For this task
There are two more commandos with impulses and with points that you
have to use . In order for the history to be placed under the graph you need further
set key below. Furthermore you only need the three to the right plot here
six columns of the file using.dat.
Task 4 – I will do that task it is more general 😊

Potrebbero piacerti anche