123

Shell练习(十)-kindy个人博客

 6 years ago
source link: http://blog.51cto.com/11924224/2083246
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
习题1:用户交互脚本要求:写一个脚本,执行后,打印一行提示“Pleaseinputanumber:”,要求用户输入数值,然后打印出该数值,然后再次要求用户输入数值。直到用户输入”end”停止。参考答案:#!/bin/bash#date:2018年3月5日while:doread-p"Pleaseinputanumber:(endforexit)"nnum=`echo$n|sed-r's/[0-9]

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK