Hello,
I'm trying to do specific actions based on whether a string is contained within a file or not. More specifically, I'm using the $LOGIN variable to compare to a user_list plain text file to determine what auto login process to execute for the specific user.
I've seen several posts using the following format to determine if a string is contained within the specific file name, but I'm having issues putting this into a conditional loop to execute the different login processes.
find . -name 'user_list.txt' -exec grep -ilw "$LOGIN" {} \;
This outputs the filename when the $LOGIN is contained and outputs nothing if it isn't, but I can't figure out a way to use this info.
Any input or ideas would be greatly appreciated.
Additional info: OS - AIX 5.3 using k-shell
Thanks