#!/bin/csh -f #+ # tolower -- convert argument(s) to lower case # # Purpose: # Convert all of the passed text to lower case. # # Usage: # tolower # # Arguments: # text = text string to be converted # # Output: # The converted text is written to stdout # # Exit values: # 0 = normal completion # 1 = no arguments # # Example: # 1) convert the string "RED" to lowercase: # tolower RED # #- # Modification history: # 2000-Jul-11 GDW Original version #----------------------------------------------------------------------- # extract command name... set buf = $0 set cmd = $buf:t # verify args... if ( $#argv < 1 ) then echo "Usage: $cmd text" exit 1 endif # convert to lowercase... perl -e 'print lc("'"$*"'\n")'