Re: Working sms time check?

"@lbutlr" <[email protected]> Thu, 2 Jun 2016 15:18:39 -0600
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On Jun 2, 2016, at 12:30 AM, Ruud H.G. van Tol <[email protected]> wrote:
> On 2016-06-02 07:31, @lbutlr wrote:
> 
>> The issue is that the find does not fill the variable.
>> 
>> SMS_TIME=`/usr/bin/find . -mtime +24h -maxdepth 1 -name .SMS_$LISTNAME | /usr/bin/sed 's/^.......//‘`
>> 
>> ALWAYS ends up with an empty SMS_TIME regardless of the time stamp on the file.
> 
> 1. Use an absolute path, instead of the dot.

The touch command creates the file in the right directory, but yes, I can try that.

> 2. What are the 7 characters that the sed-command is supposed to remove?
> Just put them in the command.

"./.SMS_” I want to end up with jut the $LISTNAME in SMS_TIME so that I can later check 

LISTNAME ?? ^^$SMS_TIME^^

> 3. There is a weird closing-quote at the end of the sed parameter.

I think that is an artifact of my mailer “smartening” the quote, but I will double check.

> 4. Log every step, while testing.

Yeah, that’s how I figured out the field is always empty, regardless.

Wil report back, the machine is doing a backup now.

-- 
'I'll see you all tomorrow. If there is one.'


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail