Commit 5c22230f authored by Paul John King's avatar Paul John King

Documented _echo_stdin function --

parent 03fb4f56
......@@ -12,6 +12,11 @@
# TODO: Comment the private functions.
# Public Functions
# ----------------
# The following functions are all available via command calls.
usage(){
_echo_stdin <<- __END_OF_STDIN__
......@@ -862,6 +867,50 @@ get_mac_address(){
# Private functions
# -----------------
# The function call
#
# _echo_stdin
#
# simply streams its standard input to its standard output. It can avoid a
# "useless use of cat" with HERE documents. For example, the call
#
# _echo_stdin <<- __END_OF_STDIN__
# single'quote
# double"quote
# multiple space
# tab space
# leading spaces
# ${HOME}
# $(hostname)
# escaped dollar \$HOME
# __END_OF_STDIN__
#
# and the call
#
# cat <<- __END_OF_STDIN__
# single'quote
# double"quote
# multiple space
# tab space
# leading spaces
# ${HOME}
# $(hostname)
# escaped dollar \$HOME
# __END_OF_STDIN__
#
# both output
#
# single'quote
# double"quote
# multiple space
# tab space
# leading spaces
# /home/paul
# overtime
# escaped dollar $HOME
#
# but the first avoids creating and destroying a separate `cat` process.
_echo_stdin(){
while IFS="" read -r line ;
......@@ -1129,6 +1178,9 @@ _get_value_by_tag_and_attribute_from_xml(){
} ;
# Script
# ------
case "${1} ${2} ${3}" in
"get image path")
shift 3 ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment