I'm merging (and afterwards minify with YUI compressor) my CSS and JS files. My web application works fine when just linking the separate files.
Now I want to merge the files as one CSS file, so I just basically do the following:
find /myapp/js/ -type f -name "incl_*.js" -exec cat {} + > ./temporary/js_backend_merged.js
That merges all my javascript files perfectly. When I do this on my mac, all goes well and I can use the merged file in my application with no problems
When I merge the same files with the same command on my CentOS server, this doesn't work, my JS start throwing errors. I have the same problem when merging CSS files, the CSS doesn't render correctly on my Centos box when merged. It does when I merge them on my MAC.
Also, I did the same process before on my previous centos server, with no problems at all.
I'm thinking in the direct of a character set problem on the server maybe? Who can solve this little mistery that took 2 complete days of my time already with no luck at all...
UPDATE: the problem is that the command: find /myapp/js/ -type f -name "incl_*.js" -exec cat {} + > ./temporary/js_backend_merged.js orders files from incl_01 to incl_02, ... correctly on the mac, but the same command orders these files differently on the server
I see that I can use sort -n to sort results, but I cant get the above command working correctly with the sort option added to it.