一本完整的描述Unix Shell 编程的工具书的所有范例

源代码在线查看: usage-message.sh

软件大小: 1148 K
上传用户: buptbaishikele
关键词: Shell Unix 编程 范例
下载地址: 免注册下载 普通下载 VIP

相关代码

				#!/bin/bash				# usage-message.sh								: ${1?"Usage: $0 ARGUMENT"}				#  Script exits here if command-line parameter absent,				#+ with following error message.				#    usage-message.sh: 1: Usage: usage-message.sh ARGUMENT								echo "These two lines echo only if command-line parameter given."				echo "command line parameter = \"$1\""								exit 0  # Will exit here only if command-line parameter present.								# Check the exit status, both with and without command-line parameter.				# If command-line parameter present, then "$?" is 0.				# If not, then "$?" is 1.							

相关资源