Recursively change file type
I did it with xattr !
My final script is :

find FOLDER -type f ! -name "*.*" -print0 | xargs -0 xattr -wx com.apple.LaunchServices.OpenWith \
"`xattr -px com.apple.LaunchServices.OpenWith FILEWITHGOODTYPE`"


Replace FOLDER by your folder (containing files without extension) (drag and drop)

Replace FILEWITHGOODTYPE by a file which has the expected type (drag and drop)



I found what I was looking for here :

https://stackoverflow.com/q/4833052/4135158