So, what I am trying to do is look for a set of files, and then have it echo which ones it has found. For example, this is what I have
#!/bin/bash LaunchDaemon="LaunchDaemon.plist" launchAgent="LaunchAgent" mobileLaunchDaemon="MobileDaemon.plist" mobileAgent="MobileAgent" if [ -f "$LaunchDaemon" ] || [ -f "$launchAgent" ] || [ -f "$mobileLaunchDaemon" ] || [ -f "$mobileAgent" ] then echo "<result>Found</result>" else echo "<result>Not Found</result>" fi
So, this will tell me if it can find any of them, but it won't tell me which one it is finding. I created another with
elif statements inside, which works sort of, but if it finds the first one, it stops there and won't tell me if the others are there as well. So, I hope this makes sense, I'm just trying to find a way to display which of the files have been found.