Pre-filling a prompt in Bash

前端 未结 2 1006
后悔当初
后悔当初 2021-01-18 05:30

Writing a bash script, and I want to get user input. Awesome,

read -p \"What directory should we save in? \" -e FOLDER

Except that what I\'

2条回答
  •  时光取名叫无心
    2021-01-18 06:11

    $ read -p "What directory should we save in? " -i "/home/user/default/" -e FOLDER
    What directory should we save in? /home/user/default/
    

    that should work, right?

提交回复
热议问题