当前位置:网站首页>Shell script receives and returns parameters
Shell script receives and returns parameters
2022-07-19 03:19:00 【Nutshell】
One 、 Script receive parameters
$1 Represents the first parameter
$2 Represents the second parameter
…
[email protected] Represents all parameters
#!/bin/bash
if [ $1="xiaofeiyu" ]
then
echo "my name is $1"
fi
if [ $2="happy" ]
then
echo "I'm very $2"
fi

Two 、 Script reply parameters
#!/bin/bash
fdisk sd.img <<EOF
n
p
1
2048
4096
EOF
边栏推荐
- Specifications, multi table query basis
- SysTick定时器的基础学习以及手撕代码
- [MCU simulation] (XXI) dB (define byte) - define byte
- 【回归预测】基于粒子滤波实现锂离子电池寿命预测附matlab代码
- 重写equals为什么要重写hashcode
- Letv a plus de 400 employés? Le jour de l'immortel sans patron, les autorités ont répondu...
- CorelDRAW 安装不了解决方法
- Fiddler抓包
- [single chip microcomputer simulation] (10) instruction system - multiplication instruction and division of arithmetic operation instruction
- In depth understanding of machine learning - unbalanced learning: sample sampling technology - [smote sampling method and borderline smote sampling method of manual sampling technology]
猜你喜欢

Ubuntu clear CUDA cache

ES6学习笔记——B站小马哥

Is there really no way out for functional testing? 10K capping is never a joke

A Youku VIP member account can be used by several people to log in at the same time. How to share multiple people using Youku member accounts?

JPA初识(ORM思想、JPA的基本操作)

工具及方法 - Excel插件XLTools

05_ Service call ribbon

JDBC connection to MySQL database
![[face recognition] face recognition based on histogram histogram with matlab code](/img/a6/ae776d084a207647501ca951e32000.png)
[face recognition] face recognition based on histogram histogram with matlab code

一个优酷VIP会员帐号可以几个人用的设备同时登录如何共享多人使用优酷会员账号?
随机推荐
[MCU simulation] (IV) addressing mode register addressing and direct addressing
mysql复制表
Ncnn allocator memory allocator
乐视还有400多位员工?过着没有老板的神仙日子 官方出来回应了...
D. Permutation restoration (greedy / double pointer /set)
Ncnn thread
我最高产的EasyPyPI又双叒叕更新了!v1.4.0发布
The WinRAR command copies the specified folder as a compressed file, and calls the scheduled task for backup.
JDBC connection to MySQL database
Specifications、多表查询基础
2002 - Can‘t connect to server on ‘127.0.0.1‘ (36)
[MCU simulation] (V) addressing mode - immediate addressing and register indirect addressing
Wechat applet
[NoSQL] redis high availability and persistence
[MCU simulation] (XV) instruction system bit operation instructions - bit operation instructions, bit conditional transfer instructions
【单片机仿真】(七)寻址方式 — 位寻址
ncnn DataReader&Extractor&blob
【PHP】tp6多表连接查询
Configure high availability using virtual ip+kept
Polynomial interpolation fitting (II)