Some sample data would help as the inverse complex pattern is beyond my imagination. What's your shell / version? Your files have leading dots? I guess <FiileName> is a typo?
Which AIX version are you running? It might make a difference.
Are these conditions to be AND-ed together or OR-ed together? Please be specific else we might go the wrong way about this. As RudiC mentions, it would be better to know what to positively look for rather than try to strip out the unwanted.
Perhaps (depending on the size of the file list being processed) you could use these tests to build a list of files that you want to exclude and then use something like grep -vfF remove_these main_file_list > wanted_file_list to get you close, but if the remove list gets large then results can be less predictable and slow. It would cost processing and IO to go this long way round, but it's possible if there is not better logic to positively select what you want to report.
The easiest way to get your actual output file when you have a list of names may be something like:-
Of course, there may be a better way to blend it into a single operation, saving the processing and IO cost, but you need to help us understand the context. Some examples would be good.
Should you run a recent shell ( bash , ksh ) that provides "extended globbing" of "pattern-lists", you might use this to feed into rbatte1's awk proposal:
ls @(!(@(.abc*@(def|pqr)*|.tvs*|*xyz*.xml|*.hij|.hij*))|@(*\ *|.*\ *))
I have made minor change to the pattern as well as corrected the typo on the output file and also included sample filenames and the expected output file.
If a filename does NOT match the below pattern and if any of the FileNames contain spaces in them then write an OUTPUT xml file with the FileNames in the below xml format
Ends with (.abc) and contains (DEF)
Ends with (.abc) and contains (PQR)
Ends with (.xml) and conatins (XYZ)
Starts with (TVS)
Starts with (TVS) and contains(SPR)
Contains(HIJ)