in shared - file pattern matching, trimming \n