This is a simple syntax question about trying to find files that are newer than a certain date within a particular directory tree (in this case,within a .kde4 tree). This is just out of general interest, and can't be said to be in any way urgent, as I'm just trying to satisfy curiosity here and my crude script accomplished the necessary minimum.
What I am trying to do is use find to go through the .kde4 tree and find what is new there. What I've got is:
find ~/.kde4 -type f -mtime -5 -ls | grep -v .org | grep -v .co.uk | grep -v .com | grep -v cache-
(you can ignore the two 'sep'statements - they just print a row of dashes, to make script output easier to read, and is used in other scripts)
The first issue is that the line of 'grep -v' statements is inelegant, and I'm sure there is a way of filtering several things at once, but I can't figure out the syntax.
The supplementary question is that the script uses fixed parameters (-mtime 5, .kde4) which it might be nice to read from the invocation.
I could read $1, $2,... but sorting out the business of the parameters being given in different orders, sometimes being present, sometimes absent, sometimes non-numerical parameters being given where numbers should have been given and this seems more complication than is sensible for a trivial script. Is this because I'm trying to do this the hard way, and there is an easy way that I should be using?