I'd like to use the output of a Shell/Applescript as input

Hello,
I'm sorry if this has already been answered, I searched the forums but couldn't find it.
Say I have a bunch of files. I want to sort them into subfolders based on certain metadata that Hazel doesn't support. I can extract the metadata using the shell, but now I want Hazel to be able to use that result to sort the files into subfolders.
Is that possible? Thanks!
I'm sorry if this has already been answered, I searched the forums but couldn't find it.
Say I have a bunch of files. I want to sort them into subfolders based on certain metadata that Hazel doesn't support. I can extract the metadata using the shell, but now I want Hazel to be able to use that result to sort the files into subfolders.
Is that possible? Thanks!