I have created a script that allows the user to select a file by copying and pasting that file. Then perform a grep on that file. I want to know is it possible to put a number in front of each files in the directory so the user will only have to type a number.
What I have tried:
ls | wc -lthen have the user select the corresponding file number, no luck.
ls -i, tried to perform a grep using the node number for that file, no luck.