Mt Xia: Technical Consulting Group
Business Continuity / Disaster Recovery / High Availability Data Center Automation / Audit Response / Audit Compliance
#!/usr/bin/ksh93 ################################################################ #### Program: yes_k93 #### #### Description: Emulation of the Unix "yes" command #### #### Author: Dana French (dfrench@mtxia.com) #### Copyright 2004 #### #### Date: 07/28/2004 #### ################################################################ function yes_k93 { typeset TRUE="0" typeset FALSE="1" typeset VERBOSE="${FALSE}" typeset VERYVERB="${FALSE}" typeset FNAME while getopts ":vV" OPTION do case "${OPTION}" in 'v') VERBOSE="${TRUE}";; 'V') VERYVERB="${TRUE}";; '?') print "Syntax: yes_k93 [STRING]..." && exit 1 ;; esac done shift $(( ${OPTIND} - 1 )) STRING="${@}" [[ "_${STRING}" = "_" ]] && STRING="y" while : do print -- "${STRING}" done return "${TRUE}" } ################################################################ yes_k93 "${@}"