暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
Shell 编程基础知识食用(二).pdf
139
5页
8次
2023-03-06
免费下载
[root@Salvatore-zz ~]# echo "The cost of the item is $15"
The cost of the item is 5
1
2
[root@Salvatore-zz ~]# echo ' The cost of the item is $15'
The cost of the item is $15
1
2
[root@Salvatore-zz ~]# echo "The cost of the item is \$15"
The cost of the item is $15
1
2
[root@Salvatore-zz script]# cat test3.sh
#!/bin/bash
#test variables
days=10
guest="zz"
echo "$guest checked in $days days ago"
[root@Salvatore-zz script]# chmod +x test3.sh
[root@Salvatore-zz script]# ll
total 4
-rwxr-xr-x. 1 root root 88 Feb 21 01:49 test3.sh
[root@Salvatore-zz script]# ./test3.sh
zz checked in 10 days ago
[root@Salvatore-zz script]#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@Salvatore-zz script]# cat test4.sh
#!/bin/bash
#assigning a varable value to another varable
value1=10
value2=$value1
echo "The resulting value is $value2"
[root@Salvatore-zz script]# ./test4.sh
The resulting value is 10
1
2
3
4
5
6
7
8
9
10
[root@Salvatore-zz script]# cat test4.sh
1
of 5
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文档被以下合辑收录

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜