https://stackoverflow.com/questions/5163144/what-are-the-special-dollar-sign-shell-variables

mkdir folder && cd $_    (创建一个目录,并且立马切换到这个目录里面去。)

  • $1$2$3, ... are the positional parameters.
  • "$@" is an array-like construct of all positional parameters, {$1, $2, $3 ...}.
  • "$*" is the IFS expansion of all positional parameters, $1 $2 $3 ....
  • $# is the number of positional parameters.
  • $- current options set for the shell.
  • $$ pid of the current shell (not subshell).
  • $_ most recent parameter (or the abs path of the command to start the current shell immediately after startup).
  • $IFS is the (input) field separator.
  • $? is the most recent foreground pipeline exit status.
  • $! is the PID of the most recent background command.
  • $0 is the name of the shell or shell script.

shell脚本变量的参数的更多相关文章

  1. shell脚本变量

    既然是变量,自然分变量名和变量值,在使用的时候一定要注意哪些地方需要用变量名,哪些地方需要用变量的值. 自定义变量 shell变量不需要声明,随用随定义,给变量赋值的时候要注意 shell是空格敏感的 ...

  2. [Python]在python中调用shell脚本,并传入参数-02python操作shell实例

    首先创建2个shell脚本文件,测试用. test_shell_no_para.sh 运行时,不需要传递参数 test_shell_2_para.sh 运行时,需要传递2个参数  test_shell ...

  3. shell脚本处理长参数的模板

    shell脚本处理长参数的模板 一个shell模板,处理命令行参数,支持长短参数: #!/bin/bash # # FILE: kvm-clone-v2.sh # # DESCRIPTION: Clo ...

  4. Java代码调用Shell脚本并传入参数实现DB2数据库表导出到文件

    本文通过Java代码调用Shell脚本并传入参数实现DB2数据库表导出到文件,代码如下: import java.io.File; import java.io.IOException; import ...

  5. shell脚本添加实例化参数

    通过shell脚本给GMP系统添加一个环境变量参数dateSwitchTimeInterval 1. insert.sh #!/bin/sh . ~/apphome/aic_export.sh #连接 ...

  6. SHELL脚本--变量(基础)

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 变量存在于内存中.假设变量str,设置或修改变量属性时,不带$ ...

  7. shell脚本--变量与数组

    Linux中的变量有环境变量和用户自定义变量,关于环境变量,可以查看这篇博客:linux环境变量 本文主要针对的是用户在shell脚本中定义的变量,但是环境变量也可以在shell脚本中使用. 普通变量 ...

  8. SHELL脚本--变量

    环境变量 环境变量就是运行在"环境"上下文的,在这个上下文都可以引用.例如,常见的cd.ls等命令严格来说应该使用绝对路径如/bin/ls来执行,由于/bin目录加入到了PATH环 ...

  9. shell脚本学习- 传递参数

    跟着RUNOOB网站的教程学习的笔记 我们可以在执行shell脚本时,向脚本传递参数,脚本内获取参数的格式为:$n.n代表一个数字,1为执行脚本的第一参数,2为执行脚本的第二个参数,以此类推... 实 ...

随机推荐

  1. C++11并发之std::mutex

    知识链接: C++11并发之std::thread   本文概要: 1. 头文件. 2.std::mutex. 3.std::recursive_mutex. 4.std::time_mutex. 5 ...

  2. CLUSTER - 根据一个索引对某个表集簇

    SYNOPSIS CLUSTER indexname ON tablename CLUSTER tablename CLUSTER DESCRIPTION 描述 CLUSTER 指示PostgreSQ ...

  3. basename - 从文件名中剥离目录和后缀

    总览 (SYNOPSIS) basename NAME [SUFFIX] basename OPTION 描述 (DESCRIPTION) 显示 去掉 目录成分 后的 NAME. 如果 指定了 SUF ...

  4. Windos无法验证文件数组签名

    参考链接:https://jingyan.baidu.com/article/09ea3ede6982c4c0aede39e6.html Windows无法验证文件数字签名而无法启动,照以下去做,可以 ...

  5. sosoapi的安装

    sosoapi简介及其用户手册:http://www.sosoapi.com/pass/help/manual.htm 该随笔的大概分为: 1.sosoapi的基础安装  2.sosoapi使用域名访 ...

  6. delphi 7 生成 调用 bat文件的exe文件

    unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ...

  7. JavaSE-21 字符编码简介

    ASCII ASCII(American Standard Code for Information Interchange,美国信息交换标准代码)是基于拉丁字母的一套电脑编码系统,主要用于显示现代英 ...

  8. 子例程 subroutine

    #! /usr/bin/perluse strict;use warnings;print "\n---------summation_STDIN_parameter----------\n ...

  9. JAVA基础——设计模式之简单工厂模式

    在阎宏博士的<JAVA与模式>一书中开头是这样描述简单工厂模式的:简单工厂模式是类的创建模式,又叫做静态工厂方法(Static Factory Method)模式.简单工厂模式是由一个工厂 ...

  10. PyTorch: 序列到序列模型(Seq2Seq)实现机器翻译实战

    版权声明:博客文章都是作者辛苦整理的,转载请注明出处,谢谢!http://blog.csdn.net/m0_37306360/article/details/79318644简介在这个项目中,我们将使 ...