Table of Contents

Shell Scripting 2

Slide-uri de prezentare

Exerciții

Hands on (1)

cd ~
mkdir slash
cd !$
mkdir conf lib bin logs
cd conf
touch apache.conf bind.conf postfix.conf hosts services protocols
cd ..
cd lib
touch dns.so gethostbyname.so ip.so tcp.so smtp.so
cd ..
cd logs
mkdir apache bind postfix
touch apache/access.log apache/error.log bind/access.log bind/error.log postfix/access.log postfix/error.log
cd ..
cd bin
cp /bin/true apache
cp /bin/true postfix
cp /bin/true bind
cd ~

Hands on (2)

nume,email
Alex,alex@example.com
Traian,traian@example.com

precum și un template, de genul:

Salut NUME!
...
Acest mesaj îți este adresat ție și numai ție.

Ca date de ieșire, scriptul va crea într-un director emails câte un fișier cu numele email personalizat pentru fiecare nume din fișierul dat.

Hands on (3)

Recapitulare