I would like to update script further.
Search the specific filenames: /tmp/reboot?_ips and allow the user to input a desired filename to reboot. Additionally, make sure that the name contains 7 chars and the user confirms the correct reboot file by entering the 7th char of the selected filename.
For instance I have the following:
HTML Code:
files in the /tmp directory
reboota_ips
rebootb.ips
rebootc.ips
rebootd_ips
Therefore the script will first Prompt the user with the available reboot files in /tmp directory and allow them type the correct filename and confirm that the 7th char is the actual file they are looking to reboot
HTML Code:
echo From the reboot files found in the /tmp directory please type the correct filename to reboot device and confirm with 7th char.
find . | /tmp/reboot*
I'm pretty sure a CASE statement would do the trick here but need your input.
After the user inputs one of the "reboot?" file, I think the next step would be to append that to this portion of the current script
HTML Code:
'ips_all="/tmp/$reboot?_ips".'