Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I have mentioned few below,
Write a java programme which would read the XML(input) and compare against a UNIX directory structure.
Write a shell programme which read flat file and check for the existence of the file in UNIX directory structure..
Writing a shell script (bash, ksh, etc.) and using a flat file would be preferable to using Java and XML. In my opinion, you are overcomplicating the problem by using Java and XML.
If I understand at all what you are trying to do, it's basically a one-liner in shell.
#!/bin/sh
while read file; do test -x "$file" && echo "have $file" || echo "no $file (or not executable)"; done <<HERE
/bin/echo
/no/such/path
/etc/issue
/home/era/.xsession
HERE