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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

#+ typed by Control−V .<br />

# Bram Moolenaar points out that this may not work with 'vim',<br />

#+ because of possible problems with terminal interaction.<br />

exit 0<br />

The above script could just as effectively have been implemented with ex, rather than vi. Here documents<br />

containing a list of ex commands are common enough to form their own category, known as ex scripts.<br />

Example 17−2. broadcast: Sends message to everyone logged in<br />

#!/bin/bash<br />

wall

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

Saved successfully!

Ooh no, something went wrong!