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
- Redis Reading NotesRedis
- BraTs literature reading(Lee)
- MySQL:Lost connection to MySQL server at 'readingMySqlServer
- Python Geospatial Development reading note(1)Pythondev
- Python -- raw_input() and input() -- ACMPythonACM
- input
- [Paper Reading] DDIM: DENOISING DIFFUSION IMPLICIT MODELS
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- [Paper Reading] Tesla AI Day for FSD BetaAI
- Reading and Understanding Systemstate Dumps (Doc ID 423153.1)
- 3D Object Detection Essay Reading 2024.03.273DObject
- 3D Object Detection Essay Reading 2024.04.013DObject
- [Paper Reading] Reconstructing Hands in 3D with TransformersStruct3DORM
- Paper Reading: Random Balance ensembles for multiclass imbalance learningrandom
- Vue 3 Reactivity System Source Code Reading: `markRaw`VueReact
- 《Windows 10 Control Flow Guard Internals》 Reading NotesWindows
- ABAP 辨析ON INPUT|REQUEST|CHAIN-INPUT|CHAIN-REQUESTAI
- [Paper Reading] VQ-VAE: Neural Discrete Representation Learning
- Paper Reading:A Survey of Deep Learning-based Object DetectionObject
- 關於寫文章發文章的Reading List
- Paper Reading: Cost-sensitive deep forest for price predictionREST
- Source Code Reading for Vue 3: How does `hasChanged` work?Vue
- JavaScript input 事件JavaScript事件
- HTML input rangeHTML
- Shell:子shell概念
- Reading Face, Read Health論文閱讀筆記筆記
- Paper Reading: JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language ModelsAI
- Python2 中 input() 和 raw_input() 的區別Python
- input捕捉Enter鍵
- HTML input date calendarHTML
- HTML input url域HTML
- HTML input 元素概述HTML
- div實現input
- angular input和outputAngular
- 3-input LUT
- HTML 25 - Input AttributesHTML
- react input[type='number']React
- input type="file"使用