UnluckyForSome Posted July 11, 2018 Share Posted July 11, 2018 Hi! I want to list files that match a certain pattern: Name (Europe) but also DOES NOT contain the pattern: (??, AKA an open bracket, two characters which could be anything and a comma - For example (En, I am having to use shell_exec as the script is going through all sorts of files with funny characters. So far I have: $fCheck = trim(shell_exec("ls -1 \"{$niceName} (Europe)\"* 2>/dev/null | grep -v '(??,'")); But I think the globbing syntax is wrong? That or the shell_exec is messing it up somehow. Apologies for my lack of knowledge! Link to comment Share on other sites More sharing options...
UnluckyForSome Posted July 11, 2018 Author Share Posted July 11, 2018 Seem to have fixed this with grep -v '([A-Z][a-z],' Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.