Shell基础知识点(1)---输出和变量

输出

#!/bin/bash           #指定shell程序的解释器
echo "hello shell!"   #输出语句

在这里插入图片描述
在这里插入图片描述

变量

#!/bin/bash
# 从终端读取用户输入的数据 并赋值给preson变量
# read命令来从标准输入中读取用户输入的数据
echo "What is your name ?"
read preson
echo "hello, $preson"

在这里插入图片描述
在这里插入图片描述

发布了103 篇原创文章 · 获赞 1 · 访问量 937

猜你喜欢

转载自blog.csdn.net/qq_45652989/article/details/104314840