You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 1. Crea mediante comandos de bash la siguiente jerarquía de ficheros y directorios.
6
+
7
+
```
8
+
foo/
9
+
├─ dummy/
10
+
│ ├─ file1.txt
11
+
│ ├─ file2.txt
12
+
├─ empty/
13
+
```
14
+
15
+
Donde `file1.txt` debe contener el siguiente texto:
16
+
17
+
```
18
+
Me encanta la bash!!
19
+
```
20
+
21
+
Y `file2.txt` debe permanecer vacío.
22
+
23
+
24
+
### 2. Mediante comandos de bash, vuelca el contenido de file1.txt a file2.txt y mueve file2.txt a la carpeta empty.
25
+
26
+
El resultado de los comandos ejecutados sobre la jerarquía anterior deben dar el siguiente resultado.
27
+
28
+
```
29
+
foo/
30
+
├─ dummy/
31
+
│ ├─ file1.txt
32
+
├─ empty/
33
+
├─ file2.txt
34
+
```
35
+
36
+
Donde `file1.txt` y `file2.txt` deben contener el siguiente texto:
37
+
38
+
```
39
+
Me encanta la bash!!
40
+
```
41
+
42
+
### 3. Crear un script de bash que agrupe los pasos de los ejercicios anteriores y además permita establecer el texto de file1.txt alimentándose como parámetro al invocarlo.
43
+
44
+
Si se le pasa un texto vacío al invocar el script, el texto de los ficheros, el texto por defecto será:
0 commit comments