Add ISO/examenes/tema10
This commit is contained in:
parent
1009eadc22
commit
766fd9b749
2
1/ISO/examenes/tema10-naortega/prob1-1.sh
Executable file
2
1/ISO/examenes/tema10-naortega/prob1-1.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo "Se han introducido $# argumentos."
|
2
1/ISO/examenes/tema10-naortega/prob1-2.sh
Executable file
2
1/ISO/examenes/tema10-naortega/prob1-2.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo "Argumento 1: $1"
|
2
1/ISO/examenes/tema10-naortega/prob1-3.sh
Executable file
2
1/ISO/examenes/tema10-naortega/prob1-3.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo "Argumento 2: $2"
|
3
1/ISO/examenes/tema10-naortega/prob1-4.sh
Executable file
3
1/ISO/examenes/tema10-naortega/prob1-4.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
PROD=$(expr $1 \* $2)
|
||||
echo "Producto $1*$2=$PROD"
|
9
1/ISO/examenes/tema10-naortega/prob1-5.sh
Executable file
9
1/ISO/examenes/tema10-naortega/prob1-5.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
echo "Se precisan al menos 3 argumentos."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i in $@; do echo "$i"; done
|
7
1/ISO/examenes/tema10-naortega/prob2.sh
Executable file
7
1/ISO/examenes/tema10-naortega/prob2.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
if [[ -n $1 ]]
|
||||
then
|
||||
echo $1
|
||||
else
|
||||
echo "No hay argumentos."
|
||||
fi
|
4
1/ISO/examenes/tema10-naortega/prob3.sh
Executable file
4
1/ISO/examenes/tema10-naortega/prob3.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
mkdir -p ~/dir1 ~/dir3/dir21
|
||||
mkdir -p ~/dir4/dir31
|
||||
mkdir ~/dir2
|
18
1/ISO/examenes/tema10-naortega/prob4.sh
Executable file
18
1/ISO/examenes/tema10-naortega/prob4.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# a)
|
||||
ls /dev/tty??
|
||||
# b)
|
||||
ls /etc/[^t]*
|
||||
# c)
|
||||
ps | sort
|
||||
# d)
|
||||
wc -l /etc/passwd
|
||||
# e)
|
||||
ln -s /usr/dir1 /home/usuario/enlacedir1
|
||||
# f)
|
||||
cp -r /bin/u* /home/usuario/enlacedir1/
|
||||
# g)
|
||||
chmod a-w /home/usuario
|
||||
# h)
|
||||
cat /etc/motd
|
Loading…
Reference in New Issue
Block a user