Web site builder - Sams Teach Yourself Shell Programming in 24 Hours
Sams Teach Yourself Shell Programming in 24 Hours Contents Index Hour 13: Input/Output Previous Chapter Next Chapter Sections in this Chapter: Output Summary Input Questions File Descriptors Terms Previous Section Next Section Questions 1. Complete the script using the appropriate printf commands to perform the specified numeric conversions. Assume that the input is always a number: #!/bin/sh if [ $# -lt 2 ] ; then echo “ERROR: Insufficient arguments.” ; exit 1 ; fi case “$1″ in -o) : # convert the number stored in “$2″ into octal ;; -x) : # convert the number stored in “$2″ into hexadecimal ;; -e) : # convert the number stored in “$2″ into scientific notation ;; *) echo “ERROR: Unknown conversion, $1!” ;; esac 2. Rewrite the error messages in the previous script to redirect their output to STDERR instead of STDOUT. Sams Teach Yourself Shell Programming in 24 Hours Contents Index Hour 13: Input/Output Previous Chapter Next Chapter Sections in this Chapter: Output Summary Input Questions File Descriptors Terms Previous Section Next Section Copyright Macmillan Computer Publishing. All rights reserved.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.