#!/bin/bash
rm out.txt
l=$(ls)
for s in $l
do
echo "$s" >> out.txt
if [ "$s" == "all.sh" ]
then
cat all.sh >> out.txt
elif [ "$s" == "ifthenelse.sh" ]
then
cat all.sh >> out.txt
/bin/bash ifthenelse.sh "Linus Torvalds" >> out.txt
/bin/bash ifthenelse.sh "Intel" >> out.txt
/bin/bash ifthenelse.sh "David Vajda" >> out.txt
/bin/bash ifthenelse.sh "Max Mustermann" >> out.txt
else
/bin/bash "./$s" >> out.txt
fi
done
#!/bin/bash
a=(Wir nehmen mal einen anderen Text)
a+=(Der sich wie immer fortsetzen laesst)
i=0
while [ $i -lt 12 ]
do
echo "${a[$i]}"
i=$(($i+1))
done
for s in "${a[@]}"
do
echo "$s"
done
#!/bin/bash
l=$(ls -a)
for s in $l
do
echo "$s"
done
#!/bin/bash
# Hallo Welt Skript
echo "\#!/bin/bash"
echo "Hello World"
#!/bin/bash
if [ "$1" == "Linus Torvalds" ]
then
echo "That's a Linux Developer"
elif [ "$1" == "Intel" ]
then
echo "That's a CPU developer"
elif [ "$1" == "David Vajda" ]
then
echo "That's me"
else
echo "Es gibt viele Leute"
fi
all.sh
#!/bin/bash
rm out.txt
l=$(ls)
for s in $l
do
echo "$s" >> out.txt
if [ "$s" == "all.sh" ]
then
cat all.sh >> out.txt
elif [ "$s" == "ifthenelse.sh" ]
then
cat all.sh >> out.txt
/bin/bash ifthenelse.sh "Linus Torvalds" >> out.txt
/bin/bash ifthenelse.sh "Intel" >> out.txt
/bin/bash ifthenelse.sh "David Vajda" >> out.txt
/bin/bash ifthenelse.sh "Max Mustermann" >> out.txt
else
/bin/bash "./$s" >> out.txt
fi
done
array.sh
Wir
nehmen
mal
einen
anderen
Text
Der
sich
wie
immer
fortsetzen
laesst
Wir
nehmen
mal
einen
anderen
Text
Der
sich
wie
immer
fortsetzen
laesst
cmd.sh
.
..
all.sh
array.sh
cmd.sh
hello.sh
ifthenelse.sh
out.txt
while.sh
hello.sh
\#!/bin/bash
Hello World
ifthenelse.sh
#!/bin/bash
rm out.txt
l=$(ls)
for s in $l
do
echo "$s" >> out.txt
if [ "$s" == "all.sh" ]
then
cat all.sh >> out.txt
elif [ "$s" == "ifthenelse.sh" ]
then
cat all.sh >> out.txt
/bin/bash ifthenelse.sh "Linus Torvalds" >> out.txt
/bin/bash ifthenelse.sh "Intel" >> out.txt
/bin/bash ifthenelse.sh "David Vajda" >> out.txt
/bin/bash ifthenelse.sh "Max Mustermann" >> out.txt
else
/bin/bash "./$s" >> out.txt
fi
done
That's a Linux Developer
That's a CPU developer
That's me
Es gibt viele Leute
while.sh
Hallo zum 1.
Hallo zum 2.
Hallo zum 3.
Hallo zum 4.
Hallo zum 5.
Hallo zum 6.
Hallo zum 7.
Hallo zum 8.
Hallo zum 9.
Hallo zum 10.
#!/bin/bash
i=0
while [ $i -lt 10 ]
do
echo "Hallo zum $(($i+1))."
i=$(($i+1))
done