Help with GREP

A question asked here the other day reminded me of something I had once tried before and failed miserably. I was able to search in files .jpg .psd .tif for path name strings using OSXA Satimage. What I was never able to do and would be nice to know how is to find paths without knowing the name strings. There is a pattern that I have not fully worked out yet but it goes like this. (Don’t even know if these will post properly)

Forget it. I can’t I work a way to post what I was looking for even in complied code. This should be what I think they are:
ASCII 208, Unicode U+2013
ASCII 209, Unicode U+2014
ASCII 210, Unicode U+201C
ASCII 211, Unicode U+201D
ASCII 212, Unicode U+02BB
ASCII 213, Unicode U+02BC
ASCII 214, Unicode U+00F7
ASCII 215, Unicode U+25CA
ASCII 216, Unicode U+00FW
ASCII 217, Unicode U+0178
ASCII 218, Unicode U+2044
ASCII 219, Unicode U+20AC
ASCII 220, Unicode U+2039
ASCII 221, Unicode U+203A

Glyph 153? a kind of streched “M” rotated 90ºCCW
ASCII 128, Unicode U+00C4"

Not exactly sure what you are asking. Here is a GREP routine I use regularly to search inside graphics design files: INDD, AI, PDF, TIFF, JPG, GIF, EPS, etc.

-- revised GREP routine courtesy of
-- Bruce Phillips of MacScripter
on grepForString(path_to_grep, search_list)
	repeat with current_grep_item in search_list
		try --known bug between AppleScript and GREP where if GREP finds nothing, AppleScript errors-out
			do shell script "/usr/bin/grep --count " & quoted form of current_grep_item & " " & quoted form of POSIX path of path_to_grep
			set grep_result to result
			exit repeat
		on error error_message number error_number
			if error_message is "0" then -- grep didn't find anything
				set grep_result to 0
				-- pass on the error
				error error_message number error_number
			end if
		end try
	end repeat
	return {grep_result, contents of current_grep_item}
end grepForString

This should be able to find about anything you want as long as you can get the search value into a string. Hope it helps!

Thanks Calvin, I was unable to work out why I could not post my characters. Kind of catch 22 because I don’t understand my problem I can’t fix how to post the darn thing either. The situation in short is a path inside the file types I mentioned gets coded “8BIM”, one of the above characters and always in the sequence ASCII 208 going higher in the order with the number of paths although I only tested to about 15 followed by the name string. A clipping path always gets coded “8BIM” then glyph 153, followed by the name string, then character ASCII 128, Unicode U+00C4".

My problems are what is “glyph 153” and can a shell GREP search for it? Should shell GREP search also be able to find the other characters Im looking for.

Just looked in the character palette and “glyph 153” is listed as Unicode 2211

Im not sure if I’ve made that any more understandable or not.

Me, I would simply load the string manually in AppleScript and copy-n-paste the “wierd character” right into the string. In other words, find the wierd character manually, and copy-n-paste into AppleScript as a property or set to {“”}. I’ve had to search for “funky” characters a couple times that way. As I recall my routine above does find things like invisible soft returns and other such odd characters if needed.