当前位置:网站首页>shell脚本接收和返回参数
shell脚本接收和返回参数
2022-07-17 00:15:00 【小果壳】
一、脚本接收参数
$1 代表第一个参数
$2 代表第二个参数
…
[email protected] 代表所有的参数
#!/bin/bash
if [ $1="xiaofeiyu" ]
then
echo "my name is $1"
fi
if [ $2="happy" ]
then
echo "I'm very $2"
fi

二、脚本回复参数
#!/bin/bash
fdisk sd.img <<EOF
n
p
1
2048
4096
EOF
边栏推荐
- 树状数组与ST表
- D - parity game discretization + weighted union search set
- Simple use case writing specification
- 不会叭不会叭,昨天真有人没写出二进制枚举
- leetcode---每日一题
- 子网划分(详)
- 元宇宙公链Caduceus项目详解(一):Caduceus Metaverse Protocol的项目理念及技术框架
- The solution to the bounce and offset of unity3d game characters when jumping to the ground
- Jstat命令查看jvm的GC情况
- Sword finger offer 53 - I. find the number I in the sorted array
猜你喜欢

JS note 1

Logic vulnerability - login verification code security

深入性能测试数据分析

The JMeter BeanShell implementation writes the parameterized data generated by the request to the file

Buaaos-lab0 experimental report

Nmon使用方法
![[unity Editor Extension] unity makes its own exclusive editor panel](/img/67/12a4ab5167d4a5fc2aaba5220c8df9.png)
[unity Editor Extension] unity makes its own exclusive editor panel

sqlmap的使用

Attack and defense world - easytornado notes

转载:SQL注入常见绕过
随机推荐
Simple use case writing specification
Network layer protocol and IP packet format (detailed)
Jmeter beanshell实现把请求生成的参数化数据写入文件
怎么做好测试用例评审
Array Transformer-分块思想
BeanShell脚本获取当前时间
[solved] after referring to the local MySQL and forgetting the password, [server] --initialize specified but the data directory has files in it Aborti
Getting to know Alibaba cloud environment construction for the first time: unable to connect remotely, and having been in the pit: the server Ping fails, FTP is built, the server builds the database,
逻辑漏洞----身份验证漏洞
innodb、Mysql结构、三种删除的区别
Uniapp wechat applet login (authorize wechat first and then mobile phone number) - (1)
Array transformer blocking idea
[Ruiji takeout ⑩] rough learning of Linux & rough learning of redis
find()(名字太多人用我就加字)
Full link voltage measurement
next数组-循环节
postman的json脚本转jmeter的jmx脚本
逆元(名字太多人用我就加这几个字)
STL -- vector container
Uni app wechat applet ordering system [another order] page Jump