27.08.2015 Views

Advanced Bash−Scripting Guide

Advanced Bash-Scripting Guide - Nicku.org

Advanced Bash-Scripting Guide - Nicku.org

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Advanced</strong> <strong>Bash−Scripting</strong> <strong>Guide</strong><br />

fi<br />

done<br />

echo<br />

return 0<br />

}<br />

# Structured programming:<br />

# entire program logic modularized in functions.<br />

#================<br />

seed_random<br />

initialize_Deck<br />

initialize_Suits<br />

initialize_Cards<br />

deal_cards<br />

exit 0<br />

#================<br />

# Exercise 1:<br />

# Add comments to thoroughly document this script.<br />

# Exercise 2:<br />

# Revise the script to print out each hand sorted in suits.<br />

# You may add other bells and whistles if you like.<br />

# Exercise 3:<br />

# Simplify and streamline the logic of the script.<br />

Chapter 35. Bash, version 2 359

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!