Nugget Post : Beyond basic SED

Interesting problem to solve with sed. Given the following file: [firstCompany-1-restricted-internal] exten => _1XX,1,Goto,(from-internal,${EXTEN},1) exten => _881XX,1,Goto(from-internal,${EXTEN},1) exten => _XXX,1,Goto(app-blackhole,congestion,1) exten => _XXXXX,1,Goto(app-blackhole,congestion,1) exten => _9XXXX.,1,Dial(SIP/BRI_1_OUT/${EXTEN},60) exten => h,1,Hangup() [secondCompany-2-restricted-internal] exten => _2XX,1,Goto,(from-internal,${EXTEN},1) exten => _882XX,1,Goto(from-internal,${EXTEN},1) exten => _XXX,1,Goto(app-blackhole,congestion,1) exten => _XXXXX,1,Goto(app-blackhole,congestion,1) exten => _[*0-9]!,1,Set(restprefix=1001992) exten => _[*0-9]!,1,Goto(from-internal,${restprefix}${EXTEN},1) exten => h,1,Hangup() We'd like to be … Continue reading Nugget Post : Beyond basic SED

Bash scripting: another use for “DD”

For most linux users, "dd" is mostly used when dealing with disk issues, such as copying one disk to another (byte for byte) creating an ISO from a CD/DVD, and so on. I personally didnt know what else I would use dd for until I ran across a particular need.... I needed my linux script … Continue reading Bash scripting: another use for “DD”