I ran the above script on the server, and it worked halfways...
This is is what I got:
$ ./wordlist
sed: -e expression #1, char 12: unknown option to `s'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
find: missing argument to `-exec'
awk: cmd. line:2: END { for (i in arr) { print i, arr[i]}
awk: cmd. line:2: ^ unexpected newline or end of string
It creates the files xml.lis, words.lis and finalwordcount.
In the xml.lis there are all the paths for all XML directories (though no new lines, so basically all the directory paths have been put together).
Both of the other two files are completely empty. They are created, but contain no information.
I tried to google some suggestions on how to change the script, but didn't found any answer.
However, I believe there is something missing (or something too much) on the sed delimiters?
And about the awk part, should there be a BEGIN somewhere to match the END? All the examples I found had them both (or neither).
OK, any and all help still very much appreciated.
I think this may need only some minor adjustment to start working.
(On the sidenote, I'm beginning to re-learn stuff here. Wondering about that sed thing reminded me that I actually learned the basic use of that command some 5 years ago. But being a Windows user forgot all about it, until now.
)