当前位置:网站首页>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
边栏推荐
- bugku---game1
- [antv G2] how to solve the memory leak caused by G2
- postman的json脚本转jmeter的jmx脚本
- Attack and defense the world ---- shrink
- 理解 继承、多态、抽象以及它们的概念
- 怎么将软件的快捷方式添加到鼠标右键的列表中
- Performance test implementation specification Guide
- 静态路由(详)
- 登录功能的测试点大全
- Understand inheritance, polymorphism, abstraction and their concepts
猜你喜欢

剑指 Offer 53 - I. 在排序数组中查找数字 I

SSTI template injection

Nmon使用方法

The solution to the bounce and offset of unity3d game characters when jumping to the ground

SSTI模板注入

Network layer transmission protocol (detailed)

STL -- stack container

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

30分钟搞懂 HTTP 缓存

Logical vulnerability - authentication vulnerability
随机推荐
GoReplay
bugku---game1
如果猎人用枪打兔子
Known preorder traversal, preorder traversal, find the sequence traversal of the tree
Metersphere is based on JMeter distributed performance pressure testing platform
面试:接口和抽象类的区别-简洁的总结
性能瓶颈定位XMind
General knowledge of network (detailed)
2022.6.28-数据库-1.数据库的隔离级别
UE4 notes
Interface (collection/map) - implementation and comparison of interfaces
【瑞吉外卖⑩】Linux 粗略学习 & Redis 粗略学习
The JMeter BeanShell implementation writes the parameterized data generated by the request to the file
Jmeter接口测试之响应断言
STL -- vector container
Server knowledge (details)
SSTI template injection
No, no, No. yesterday, someone really didn't write binary enumeration
Jmeter响应时间测试组件&多接口并发
元宇宙公链Caduceus项目详解(一):Caduceus Metaverse Protocol的项目理念及技术框架