reading input to shell
!/bin/bash
echo "Please type a word!"
read word
echo "You just typed $word"
echo "Please type two words!"
read word1 word2
echo "You just typed $word1 $word2"
[jerry@localhost bin]$ ./reply_test.sh
./reply_test.sh: line 1: !/bin/bash: No such file or directory
Please type a word!
word
You just typed word
Please type two words!
word1 word2
You just typed word1 word2
echo "Please type a word!"
read word
echo "You just typed $word"
echo "Please type two words!"
read word1 word2
echo "You just typed $word1 $word2"
[jerry@localhost bin]$ ./reply_test.sh
./reply_test.sh: line 1: !/bin/bash: No such file or directory
Please type a word!
word
You just typed word
Please type two words!
word1 word2
You just typed word1 word2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23895263/viewspace-697718/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- adb shell input keyevent
- [Shell] awk學習(4)-read input file
- [Shell] Input null到檔案中的兩個方法Null
- BraTs literature reading(Lee)
- $(":input")和$("input")區別
- linux 執行shell 報錯stty: standard input: Inappropriate ioctl for device解決LinuxAPPdev
- delete input 與 delete all inputdelete
- input
- Python -- raw_input() and input() -- ACMPythonACM
- jquery 中$("form :input") $("form input") 區別jQueryORM
- raw_input() 與 input()的區別
- MySQL:Lost connection to MySQL server at 'readingMySqlServer
- Python Geospatial Development reading note(1)Pythondev
- Got timeout reading communication packetsGo
- Reading Response about Algorithm 4thGo
- Reading privileged memory with a side-channelIDE
- Error reading master configurationErrorAST
- Cloud Design Patterns Book Reading(undone)Cloud
- jQuery :inputjQuery
- <input> disabled
- input和:input選擇器的區別
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- Vue 3 Reactivity System Source Code Reading: `markRaw`VueReact
- MySQL ERROR Got an error reading communication packetsMySqlErrorGo
- #Paper Reading# Dual Learning for Machine TranslationMac
- Failed reading log event, reconnecting to retryAI
- ABAP 辨析ON INPUT|REQUEST|CHAIN-INPUT|CHAIN-REQUESTAI
- JavaScript input 事件JavaScript事件
- HTML input rangeHTML
- python中input()與raw_input()的區別Python
- backup archivelog delete input 與delete all input 區別Hivedelete
- Source Code Reading for Vue 3: How does `hasChanged` work?Vue
- [Paper Reading] DDIM: DENOISING DIFFUSION IMPLICIT MODELS
- rman 中的 delete all input 和 delete input 的區別delete
- angular input和outputAngular
- react input[type='number']React
- input捕捉Enter鍵
- div實現input