My first “advanced” bash script

So ive found the time to learn new stuff, bash scripting is 1 of the things that can (and probably will ) make my life as an system engineer more pleasant.

Ive wrote it for my work. it updates the php versions on our server and some other stuff:

php-update.sh

Only bad thing is that my first script wasnt a helly world script, so for your enjoy my 2e script:


#!/bin/bash
echo "my second script:"
if [ $? == 0 ]; then
echo "hello world"
else
echo "there is no hello world!"
fi

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *