| parameter Handling |
Description |
| $# |
The number of arguments passed to the script |
| $* |
Displays all parameters passed to the script in a single string |
| $$ |
The current process ID number for the script to run |
| $! |
ID number of the last process running in the background |
| [Email protected] |
With $ #相同, but use quotation marks and return each parameter in quotation marks. |
| $- |
Displays the current options used by the shell, the same as the SET command function. |
| $? |
Displays the exit status of the last command. 0 means there is no error, and any other value indicates an error. |
MD DUANWF 23742 CDR_CALL_YYYYMMDD/HOME/DUANWF/ASIAINFO/EXPORT/T141015001_20141014.AVL & Fetch first 100000 rows Only
The final "Fetch first 100000 rows only" is the seventh parameter, but only the fetch is obtained when it is recognized.
How do you deal with that?
Before asked someone said can use double quotation marks to bring him, the final result is still the same, unable to get, can only get to
The Fetch
Automatically disconnects before a space.
Can be processed by the [email protected] command, the $7 will be replaced by Echo ${@:7}, so that the 7th start is automatically recognized, all obtained as the last 7th parameter, the parameter gets changed to:
Shell scripts pass parameters with spaces [excerpt from network]