shell program 1

(1)use gedit write the shell program"shell":

#! /bin/bash

echo please enter something:

read qq

echo you just enter : $qq

(2)change the document authority:

chmod +x shell

(3)run the shell:

./shell

(4)the result is:

please enter something:

12345

you just enter : 12345


this program show us:

1.the shell excute program is bash,the first sentence must be #! /bin/bash

2."echo" is use to print 

3."read" is use to assign variable

4.if you want to show the variable,you have to use "$" at front of  the variable


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值