Quote:
Originally Posted by
methyl
@nixie
1) Post #1 was the worst formatted post I have seen in months.
Sorry that was my very first post.
Quote:
Originally Posted by
methyl
@nixie
2) Please use code tags when posting code or data.
Every single option when referring to options on a long command???
Quote:
Originally Posted by
methyl
@nixie
3) Please avoid punctuating code with English punctuation - particularly quotes. It makes the code read like nonsense.
It wasn't code... it was a diagnostic message issued by awk copied and pasted from the terminal window. Some of the things marked above are
awk options not a complete statement. Are you saying you want every tiny fragment put in CODE tags as was done above?
Quote:
Originally Posted by
methyl
@nixie
4) Please do not a use Microsoft character set when posting unix code. Copy/paste via Windows Notepad to get rid of weird characters which have no meaning in unix scripts.
I wasn't aware it was doing that, I was pasting from a plain text editor.
Quote:
Originally Posted by
methyl
@nixie
5) Please mention what Operating System and version you have and what Shell you are using. There is much variation on the find command and you and @alister refer to much obscure syntax which is definitely not from a unix find.
I don't know how to determine the version of Linux, (find (GNU findutils) 4.4.2) but neither are obscure, (although I agree the options could be considered obscure) they are from a very current version of CentOS, which is being run by a major web hosting company (AFAIK many of the major shared hosts use this OS).
---------- Post updated at 11:36 AM ---------- Previous update was at 10:40 AM ----------
Quote:
Originally Posted by
methyl
See man find for your system (whatever that is?). If it is not there, just use \; as usual. The + can be faster on certain Operating System (e.g. modern Solaris).
Thanks for this - I saw this
\; sequence on the original code that I got the statement from, but it was using
\ to break the statement up into multiple lines. I thought
\; was a an artifact left over from editing (having the meaning of "null/empty line"). I couldn't find
\; in the man pages - I went back and checked again and found
+ which appears to be the preferred syntax. Find is very powerful, but I find it very hard to grok - been programming for 35 years, but very new to shell scripting. I don't do enough bash scripting to keep sharp with the syntax, so I have to look almost everything up as I go so I really appreciate when the gurus here can look at a statement and give a quick pointer or hint.
Quote:
Originally Posted by
methyl
Apache is a package which you can install on unix of Linux. Whether it be unix of Linux, the Operating System will support space characters in filenames.
The sentence supplement containing "MD5" makes no sense whatsoever to me.
"Escape Sequences" are usually associated with driving special effects on Printers and VDUs. What do you mean?
Sorry maybe I should have said escaping?? i.e. preceeding with
\ to ignore the special meaning of the next character or include a character like a blank or quote.
Quote:
Originally Posted by
methyl
Please provide examples of awkward directory names which you wish to exclude (blotting anything confidential with X's).
When the list gets awkward the best approach is to use sed with a sedfile to eliminate unwanted file or directory names. Using a sedfile means that the Shell does not see the awkward names and therefore cannot confuse the situation.
I am running this script in the home directory of a shared host. AFAIK whitespace is not allowed in URL's (filenames in public_html) I certainly don't use whitespace in these names. I'm also not expecting to see them in the files of open source packages like wordpress, drupal, etc. Is
module with whitespace.class.php even legal? AFAIK it isn't, and my current belief is that no good programmer would do it.
Am I naive in these assumptions? I didn't expect to find these, so I didn't design the script with that in mind, but after your post I did a test and the line of code in question did work correctly even on a filename with a space in it.