[Asterisk-Dev] Question on using system(find args -exec rm {} \; )

bday at prosodiemail.com bday at prosodiemail.com
Wed Jan 4 08:30:25 MST 2006


Tilghman,

Thank you... your suggestion to escape the backslash \\\ fixed my problem!
It now correctly executes. :)  

Noel, I tried your suggestion of -exec rm \{\} \;), but it didn't work, I do
appreciate your suggestion.

Regards,
Bill

-----Original Message-----
From: Tilghman Lesher [mailto:tilghman at mail.jeffandtilghman.com]
Sent: Wednesday, January 04, 2006 9:43 AM
To: Asterisk Developers Mailing List
Subject: Re: [Asterisk-Dev] Question on using system(find args -exec rm
{} \; )


On Wednesday 04 January 2006 02:58, Noel Sharpe wrote:
> perhaps you need to escape the curly braces?
> exten => s,2,system(find ${PathRecordingTemp}/${CUSTNUM} -mtime +2
> -maxdepth 1  -exec rm \{\} \;)

No, what he really needs to do is to escape the backslash, as both
Asterisk, as well as bash(1), need the escapes:

system(find /foo -exec rm {} \\\;)

This question belongs on the -users list.

-- 
Tilghman
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list