Bash Shell中Shift用法分享
来源:互联网 发布:蚁群算法解决背包问题 编辑:程序博客网 时间:2024/06/05 17:21
这篇文章主要介绍了Bash Shell中Shift的使用方法,需要的朋友可以参考下。
shift可以用来向左移动位置参数。
Shell的名字 $0
第一个参数 $1
第二个参数 $2
第n个参数 $n
所有参数 $@ 或 $*
参数个数 $#
shift默认是shift 1
例子:
shift可以用来向左移动位置参数。
Shell的名字 $0
第一个参数 $1
第二个参数 $2
第n个参数 $n
所有参数 $@ 或 $*
参数个数 $#
shift默认是shift 1
例子:
cat shift.sh#----------------------------输出文字-开始----------------------------#!/bin/bash#Filename:shift.sh#by www.jbxue.comuntil [ -z "$1" ] # Until all parameters used updo echo "$@ " shiftdone#----------------------------输出文字-结束----------------------------sh shift.sh 1 2 3 4 5 6 7 8 9#----------------------------输出文字-开始----------------------------1 2 3 4 5 6 7 8 92 3 4 5 6 7 8 93 4 5 6 7 8 94 5 6 7 8 95 6 7 8 96 7 8 97 8 98 99#----------------------------输出文字-结束----------------------------
- Bash Shell中Shift用法分享
- Bash Shell中Shift用法
- 理解Bash shell中shift命令
- shell编程中shift用法
- shell中shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- linux shell中shift的用法
- Shell编程中Shift的用法
- Shell编程中Shift的用法
- shell中shift和eval的用法
- Shell编程中Shift的用法
- LINUX下的IIC驱动(一)
- android之layout_weight体验(实现按比例显示)
- Data Structure
- void
- linux批量备份服务器配置文件和目录的脚本
- Bash Shell中Shift用法分享
- Python Class
- Object-oriented features
- javaScript学习之路:document对象
- PHP中fwrite与file_put_contents性能测试代码
- Android入门前言(一)之------Android应用开发入门五问
- mysql 不等于 符号写法
- Bash的For循环(根据每次递增的数)
- Android入门教程(二)之------环境搭建