1. 问题描述: 今天在SpringMVC应用中上传参数的时候遇到如下问题: The request sent by the client was syntactically incorrect 这说明在提交的参数中,有的参数不符合服务器端数据要求.在排除其它参数没问题的情况下,确定是其中的时间参数除了问题. 客户端传送的时间参数如下所示:
shell里面如何传递参数: sh test.sh zhang 20 那test.sh里面咋接受参数呢? #!/usr/bin/env sh name=$1 age=$2 echo "name is ${name} & age is ${age}" 输出:name is yaochun & age is 20 $# 获取参数的个数 $* 获取全部参数 $@ 获取全部参数 扩展阅读: http://bbs.chinaunix.net/thread-1135876-1-
shell脚本处理长参数的模板 一个shell模板,处理命令行参数,支持长短参数: #!/bin/bash # # FILE: kvm-clone-v2.sh # # DESCRIPTION: Clone a RHEL5.4/RHEL6 kvm guest on ubuntu14.04 host superv. # This shell is used for cloning RHEL5.4 or RHEL6.x KVM guest. # Note this shell is only test