I was trying to read user input twice on the same line from a bash script. It's not very useful at all, but it's pretty and I'm trying to achieve this.
The relevant part of my code looks like that:
#!/usr/bin/env bash
FROM_YEAR=2015
TO_YEAR=2017
read -e -p "Backup from " -i "${FROM_YEAR}" FROM_YEAR
read -e -p " to " -i "${TO_YEAR}" TO_YEAR
With this code I get the following:
Backup from 2015 *press enter*
to 2017
But I would like output like this:
Backup from 2015 *press enter* to 2017
Of course, I want an output without the marking (*press enter* ).
How can I achieve that with bash script?
Thank you :)
bashis not a form-filling application.readbuilt-in.