需求: 有一个文件,根据指定的字符串,得到该字符串上两行的内容. 文件内容如下: linux-56:# cat sys.ttconnect.ini # Copyright (C) 1999, 2006, Oracle. All rights reserved. ############################################################### # This is a file used for the TimesTen Client. # It con…
一.获取用户输入1.基本读取read命令接收标准输入的输入,或其它文件描述符的输入.得到输入后,read命令将数据输入放入一个标准变量中.[root@rac2 ~]# cat t8.sh #!/bin/bash#testing the read commandecho -n "enter your name:" ---:-n用于允许用户在字符串后面立即输入数据,而不是在下一行输入.read nameecho "hello $name ,welcome to my progra…