[asterisk-users] Quick bash tip for finding free SIP extensions from your sip.conf
Kyle Sexton
ks at mocker.org
Thu Feb 2 17:46:33 CST 2012
On Thu, Feb 2, 2012 at 5:34 PM, Steve Edwards <asterisk.org at sedwards.com>wrote:
> On Thu, 2 Feb 2012, Kyle Sexton wrote:
>
> Created this function on one of my machines today, thought others might
>> find it useful:
>> freesip() {
>> comm -2 <(seq $2 $3) <(cat $1 | grep ^\\[ | sort | uniq | tr -d \[ | tr
>> -d \]) | grep ^[[:digit:]]
>> }
>>
>
> Shave 4 processes:
>
> freesip()
> {
> comm -2 -3\
> <(seq $2 $3)\
> <(grep ^\\[[[:digit:]] $1 | sort -u | tr -d \[])
> }
>
> --
> Thanks in advance,
> ------------------------------**------------------------------**
> -------------
> Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
> Newline Fax: +1-760-731-3000
>
>
Yeah, I didn't really optimize this. Thanks for the tip!
--
Kyle Sexton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120202/5c613dc9/attachment.htm>
More information about the asterisk-users
mailing list