Compare commits
36 Commits
1.1
...
e265d95dd9
| Author | SHA1 | Date | |
|---|---|---|---|
| e265d95dd9 | |||
| 0939c771f3 | |||
| 815a66d808 | |||
| f7336ae3e6 | |||
| e2346fa32f | |||
| ff7035cd22 | |||
| 4bd2566b04 | |||
| 0d67903acf | |||
| 96f5040dfe | |||
| a48e6bc452 | |||
| e64461d64c | |||
| dde357c695 | |||
| c750cb4c69 | |||
| 1af089d106 | |||
| dcaafa8604 | |||
| c3f9740332 | |||
| 81a7c96f7f | |||
| 89557b8e36 | |||
| 5d830cbae4 | |||
| fb7c410e8a | |||
| e4190bae83 | |||
| 6545189eb0 | |||
| 4e375b5d08 | |||
|
|
2be3db4187 | ||
|
|
9dc5a2550c | ||
|
|
6f82b9eda4 | ||
|
|
28dada6046 | ||
| deeb9080fe | |||
|
|
578119d663 | ||
|
|
23e7a9090a | ||
| 48da83fdd3 | |||
| 82620782b3 | |||
| b1065a657e | |||
| 68a8069739 | |||
|
|
36837548d2 | ||
|
|
407d7ef5c0 |
34
README.md
34
README.md
@@ -2,12 +2,30 @@
|
||||
|
||||
Dateien des bash Tutorioals auf raspithek.de
|
||||
|
||||
| Kapitel| Beschreibung|
|
||||
|--------|-------------|
|
||||
1 |Einführung |
|
||||
| 2 |Hello World |
|
||||
| 3 | exit Codes |
|
||||
| 4 |Variablen |
|
||||
| 5 |Verzweigungen|
|
||||
| 6 |Svhleifen |
|
||||
| Kapitel| Beschreibung |
|
||||
|--------|------------------------|
|
||||
1 |Einführung |
|
||||
| 2 |Prompt |
|
||||
| 3 |key bindings |
|
||||
| 4 |Startvorgang |
|
||||
| 5 |Environmentvariablen |
|
||||
| 6 |builtins |
|
||||
| 7 |Dateien |
|
||||
| 8 |nano |
|
||||
| 9 |bash Scripting |
|
||||
| 10 |Variablen |
|
||||
| 11 |Verzweigungen |
|
||||
| 12 |Schleifen |
|
||||
| 13 |Parameter |
|
||||
| 14 |exit Codes |
|
||||
| 15 |von der Idee zum Script |
|
||||
| 16 |Funktionen |
|
||||
| 17 |Piping und Redirection |
|
||||
| 18 |tee |
|
||||
| 19 |alias |
|
||||
| 20 |Shebang |
|
||||
| 21 |sed |
|
||||
| 22 |cd |
|
||||
| 23 |case |
|
||||
| 24 |Arrays |
|
||||
|
||||
|
||||
2
alias/noalias.sh
Executable file
2
alias/noalias.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
|
||||
ll
|
||||
3
alias/yesalias.sh
Executable file
3
alias/yesalias.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
shopt -s expand_aliases # Aktiviert Aliase
|
||||
alias ll='ls -la'
|
||||
ll
|
||||
66
boot-mountpoint/migrate-mountpoint.sh
Executable file
66
boot-mountpoint/migrate-mountpoint.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Output colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Logging-Funktion
|
||||
log() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo -e "${YELLOW}[WARN]${NC} $1"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# Check for root privileges
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create /boot/firmware dir if it doesn't exist
|
||||
if [ ! -d /boot/firmware ]; then mkdir -p /boot/firmware; fi
|
||||
|
||||
# Enable extended globbing for pattern matching
|
||||
shopt -s extglob
|
||||
|
||||
# Copy all files from /boot to /boot/firmware and remove the originals
|
||||
log "Moving files to /boot/firmware..."
|
||||
rsync -av --remove-source-files /boot/ /boot/firmware/
|
||||
|
||||
# Update the mount point for /boot in fstab to /boot/firmware
|
||||
log "Updating fstab..."
|
||||
cp -a /etc/fstab /etc/fstab.bak # create backup
|
||||
sed -i 's|^\([^#].*\)[[:space:]]/boot[[:space:]]|\1 /boot/firmware |' /etc/fstab
|
||||
|
||||
# Sync cache and reboot the system to apply changes
|
||||
sync
|
||||
# prompt for reboot
|
||||
echo ""
|
||||
while true; do
|
||||
read -p "Möchtest du das System jetzt neustarten, um die Änderungen zu testen? (J/N): " choice
|
||||
case $choice in
|
||||
[Jj]* )
|
||||
warn "System will be rebooted in 3 seconds"
|
||||
sleep 2
|
||||
reboot
|
||||
;;
|
||||
[Nn]* )
|
||||
log "Neustart übersprungen."
|
||||
log "Bitte starte das System manuell neu, um die Änderungen zu testen."
|
||||
break
|
||||
;;
|
||||
* )
|
||||
warn "Bitte antworte mit J (Ja) oder N (Nein)."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
||||
11
piping/ask
Executable file
11
piping/ask
Executable file
@@ -0,0 +1,11 @@
|
||||
|
||||
read -n1 -p "Weitermachen? (j/n)" auswahl
|
||||
|
||||
echo "auswahl = ${auswahl}"
|
||||
if [ "${auswahl}" == 'j' ];then
|
||||
echo "Es geht weiter"
|
||||
else
|
||||
echo "Dann eben nicht"
|
||||
fi
|
||||
|
||||
|
||||
8
piping/debello.txt
Normal file
8
piping/debello.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.
|
||||
Hi omnes lingua, institutis, legibus inter se differunt.
|
||||
Gallos ab Aquitanis Garunna flumen, a Belgis Matrona et Sequana dividit.
|
||||
Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent, important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.
|
||||
Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.
|
||||
Eorum una pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones.
|
||||
Belgae ab extremis Galliae finibus oriuntur, pertinent ad inferiorem partem fluminis Rheni, spectant in septentrionem et orientem solem.
|
||||
Aquitania a Garunna flumine ad Pyrenaeos montes et eam partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis et septentriones.
|
||||
0
piping/ls.txt
Normal file
0
piping/ls.txt
Normal file
0
progress-bar/bar/foo-1-cache
Normal file
0
progress-bar/bar/foo-1-cache
Normal file
0
progress-bar/bar/foo-10-cache
Normal file
0
progress-bar/bar/foo-10-cache
Normal file
0
progress-bar/bar/foo-100-cache
Normal file
0
progress-bar/bar/foo-100-cache
Normal file
0
progress-bar/bar/foo-101-cache
Normal file
0
progress-bar/bar/foo-101-cache
Normal file
0
progress-bar/bar/foo-102-cache
Normal file
0
progress-bar/bar/foo-102-cache
Normal file
0
progress-bar/bar/foo-103-cache
Normal file
0
progress-bar/bar/foo-103-cache
Normal file
0
progress-bar/bar/foo-104-cache
Normal file
0
progress-bar/bar/foo-104-cache
Normal file
0
progress-bar/bar/foo-105-cache
Normal file
0
progress-bar/bar/foo-105-cache
Normal file
0
progress-bar/bar/foo-106-cache
Normal file
0
progress-bar/bar/foo-106-cache
Normal file
0
progress-bar/bar/foo-107-cache
Normal file
0
progress-bar/bar/foo-107-cache
Normal file
0
progress-bar/bar/foo-108-cache
Normal file
0
progress-bar/bar/foo-108-cache
Normal file
0
progress-bar/bar/foo-109-cache
Normal file
0
progress-bar/bar/foo-109-cache
Normal file
0
progress-bar/bar/foo-11-cache
Normal file
0
progress-bar/bar/foo-11-cache
Normal file
0
progress-bar/bar/foo-110-cache
Normal file
0
progress-bar/bar/foo-110-cache
Normal file
0
progress-bar/bar/foo-111-cache
Normal file
0
progress-bar/bar/foo-111-cache
Normal file
0
progress-bar/bar/foo-112-cache
Normal file
0
progress-bar/bar/foo-112-cache
Normal file
0
progress-bar/bar/foo-113-cache
Normal file
0
progress-bar/bar/foo-113-cache
Normal file
0
progress-bar/bar/foo-114-cache
Normal file
0
progress-bar/bar/foo-114-cache
Normal file
0
progress-bar/bar/foo-115-cache
Normal file
0
progress-bar/bar/foo-115-cache
Normal file
0
progress-bar/bar/foo-116-cache
Normal file
0
progress-bar/bar/foo-116-cache
Normal file
0
progress-bar/bar/foo-117-cache
Normal file
0
progress-bar/bar/foo-117-cache
Normal file
0
progress-bar/bar/foo-118-cache
Normal file
0
progress-bar/bar/foo-118-cache
Normal file
0
progress-bar/bar/foo-119-cache
Normal file
0
progress-bar/bar/foo-119-cache
Normal file
0
progress-bar/bar/foo-12-cache
Normal file
0
progress-bar/bar/foo-12-cache
Normal file
0
progress-bar/bar/foo-120-cache
Normal file
0
progress-bar/bar/foo-120-cache
Normal file
0
progress-bar/bar/foo-121-cache
Normal file
0
progress-bar/bar/foo-121-cache
Normal file
0
progress-bar/bar/foo-122-cache
Normal file
0
progress-bar/bar/foo-122-cache
Normal file
0
progress-bar/bar/foo-123-cache
Normal file
0
progress-bar/bar/foo-123-cache
Normal file
0
progress-bar/bar/foo-124-cache
Normal file
0
progress-bar/bar/foo-124-cache
Normal file
0
progress-bar/bar/foo-125-cache
Normal file
0
progress-bar/bar/foo-125-cache
Normal file
0
progress-bar/bar/foo-126-cache
Normal file
0
progress-bar/bar/foo-126-cache
Normal file
0
progress-bar/bar/foo-127-cache
Normal file
0
progress-bar/bar/foo-127-cache
Normal file
0
progress-bar/bar/foo-128-cache
Normal file
0
progress-bar/bar/foo-128-cache
Normal file
0
progress-bar/bar/foo-129-cache
Normal file
0
progress-bar/bar/foo-129-cache
Normal file
0
progress-bar/bar/foo-13-cache
Normal file
0
progress-bar/bar/foo-13-cache
Normal file
0
progress-bar/bar/foo-130-cache
Normal file
0
progress-bar/bar/foo-130-cache
Normal file
0
progress-bar/bar/foo-131-cache
Normal file
0
progress-bar/bar/foo-131-cache
Normal file
0
progress-bar/bar/foo-132-cache
Normal file
0
progress-bar/bar/foo-132-cache
Normal file
0
progress-bar/bar/foo-133-cache
Normal file
0
progress-bar/bar/foo-133-cache
Normal file
0
progress-bar/bar/foo-134-cache
Normal file
0
progress-bar/bar/foo-134-cache
Normal file
0
progress-bar/bar/foo-135-cache
Normal file
0
progress-bar/bar/foo-135-cache
Normal file
0
progress-bar/bar/foo-136-cache
Normal file
0
progress-bar/bar/foo-136-cache
Normal file
0
progress-bar/bar/foo-137-cache
Normal file
0
progress-bar/bar/foo-137-cache
Normal file
0
progress-bar/bar/foo-138-cache
Normal file
0
progress-bar/bar/foo-138-cache
Normal file
0
progress-bar/bar/foo-139-cache
Normal file
0
progress-bar/bar/foo-139-cache
Normal file
0
progress-bar/bar/foo-14-cache
Normal file
0
progress-bar/bar/foo-14-cache
Normal file
0
progress-bar/bar/foo-140-cache
Normal file
0
progress-bar/bar/foo-140-cache
Normal file
0
progress-bar/bar/foo-141-cache
Normal file
0
progress-bar/bar/foo-141-cache
Normal file
0
progress-bar/bar/foo-142-cache
Normal file
0
progress-bar/bar/foo-142-cache
Normal file
0
progress-bar/bar/foo-143-cache
Normal file
0
progress-bar/bar/foo-143-cache
Normal file
0
progress-bar/bar/foo-144-cache
Normal file
0
progress-bar/bar/foo-144-cache
Normal file
0
progress-bar/bar/foo-145-cache
Normal file
0
progress-bar/bar/foo-145-cache
Normal file
0
progress-bar/bar/foo-146-cache
Normal file
0
progress-bar/bar/foo-146-cache
Normal file
0
progress-bar/bar/foo-147-cache
Normal file
0
progress-bar/bar/foo-147-cache
Normal file
0
progress-bar/bar/foo-148-cache
Normal file
0
progress-bar/bar/foo-148-cache
Normal file
0
progress-bar/bar/foo-149-cache
Normal file
0
progress-bar/bar/foo-149-cache
Normal file
0
progress-bar/bar/foo-15-cache
Normal file
0
progress-bar/bar/foo-15-cache
Normal file
0
progress-bar/bar/foo-150-cache
Normal file
0
progress-bar/bar/foo-150-cache
Normal file
0
progress-bar/bar/foo-151-cache
Normal file
0
progress-bar/bar/foo-151-cache
Normal file
0
progress-bar/bar/foo-152-cache
Normal file
0
progress-bar/bar/foo-152-cache
Normal file
0
progress-bar/bar/foo-153-cache
Normal file
0
progress-bar/bar/foo-153-cache
Normal file
0
progress-bar/bar/foo-154-cache
Normal file
0
progress-bar/bar/foo-154-cache
Normal file
0
progress-bar/bar/foo-155-cache
Normal file
0
progress-bar/bar/foo-155-cache
Normal file
0
progress-bar/bar/foo-156-cache
Normal file
0
progress-bar/bar/foo-156-cache
Normal file
0
progress-bar/bar/foo-157-cache
Normal file
0
progress-bar/bar/foo-157-cache
Normal file
0
progress-bar/bar/foo-158-cache
Normal file
0
progress-bar/bar/foo-158-cache
Normal file
0
progress-bar/bar/foo-159-cache
Normal file
0
progress-bar/bar/foo-159-cache
Normal file
0
progress-bar/bar/foo-16-cache
Normal file
0
progress-bar/bar/foo-16-cache
Normal file
0
progress-bar/bar/foo-160-cache
Normal file
0
progress-bar/bar/foo-160-cache
Normal file
0
progress-bar/bar/foo-161-cache
Normal file
0
progress-bar/bar/foo-161-cache
Normal file
0
progress-bar/bar/foo-162-cache
Normal file
0
progress-bar/bar/foo-162-cache
Normal file
0
progress-bar/bar/foo-163-cache
Normal file
0
progress-bar/bar/foo-163-cache
Normal file
0
progress-bar/bar/foo-164-cache
Normal file
0
progress-bar/bar/foo-164-cache
Normal file
0
progress-bar/bar/foo-165-cache
Normal file
0
progress-bar/bar/foo-165-cache
Normal file
0
progress-bar/bar/foo-166-cache
Normal file
0
progress-bar/bar/foo-166-cache
Normal file
0
progress-bar/bar/foo-167-cache
Normal file
0
progress-bar/bar/foo-167-cache
Normal file
0
progress-bar/bar/foo-168-cache
Normal file
0
progress-bar/bar/foo-168-cache
Normal file
0
progress-bar/bar/foo-169-cache
Normal file
0
progress-bar/bar/foo-169-cache
Normal file
0
progress-bar/bar/foo-17-cache
Normal file
0
progress-bar/bar/foo-17-cache
Normal file
0
progress-bar/bar/foo-170-cache
Normal file
0
progress-bar/bar/foo-170-cache
Normal file
0
progress-bar/bar/foo-171-cache
Normal file
0
progress-bar/bar/foo-171-cache
Normal file
0
progress-bar/bar/foo-172-cache
Normal file
0
progress-bar/bar/foo-172-cache
Normal file
0
progress-bar/bar/foo-173-cache
Normal file
0
progress-bar/bar/foo-173-cache
Normal file
0
progress-bar/bar/foo-174-cache
Normal file
0
progress-bar/bar/foo-174-cache
Normal file
0
progress-bar/bar/foo-175-cache
Normal file
0
progress-bar/bar/foo-175-cache
Normal file
0
progress-bar/bar/foo-176-cache
Normal file
0
progress-bar/bar/foo-176-cache
Normal file
0
progress-bar/bar/foo-177-cache
Normal file
0
progress-bar/bar/foo-177-cache
Normal file
0
progress-bar/bar/foo-178-cache
Normal file
0
progress-bar/bar/foo-178-cache
Normal file
0
progress-bar/bar/foo-179-cache
Normal file
0
progress-bar/bar/foo-179-cache
Normal file
0
progress-bar/bar/foo-18-cache
Normal file
0
progress-bar/bar/foo-18-cache
Normal file
0
progress-bar/bar/foo-180-cache
Normal file
0
progress-bar/bar/foo-180-cache
Normal file
0
progress-bar/bar/foo-181-cache
Normal file
0
progress-bar/bar/foo-181-cache
Normal file
0
progress-bar/bar/foo-182-cache
Normal file
0
progress-bar/bar/foo-182-cache
Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user