`

linux read命令

 
阅读更多

代码

#!/bin/bash                       
if                                
 read -t 5 -p "input name:" name  
 then echo "hello,$name good."    
 else echo "too slow."            
fi                                
exit 0                                         

 read参数解释

read: usage: read     
 [-ers]               
 [-a array]           
 [-d delim]           
 [-i text]            
 [-n nchars]          
 [-N nchars]          
 [-p prompt]          
 [-t timeout]         
 [-u fd] [name ...]   

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics