I would love to learn more about 'read' so to enhance my shell scripting abilities.
Usually when I have a thirst for knowledge for any program, I simply type:
man [program]
Then I learn how to work a program. I've been doing it this way for the past 15 years.
But a few days ago, I stumbled onto the most useless and unexpected man page (IMO) for a program called 'read'. It's a commonly used program for reading user input and a lot of shell scripts use it.
Here's it being used in one of my shell scripts.. It simply grabs a variable and outputs it, whilst allowing it to be edited by the end user:
read -e -p "HOSTip: " -i "${HOSTip}" HOSTip
This command took a lot of trawling about the web to find how to use it in this way. The man page was zero help.
Any help would be greatly appreciated in helping me figure out why a proper manual for using read doesn't appear to exist on my machine.