shell script to get yesterday’s date into a variable

a shell script which does the following to store the current day’s date in a variable ‘dt’: date “+%a %d/%m/%Y”

Read more

Asterisk CDR in MySQL

Create Database mysql -u root -p CREATE DATABASE asterisk; GRANT INSERT ON asterisk.* TO asterisk@localhost IDENTIFIED BY ’yourpassword’; USE asterisk; CREATE TABLE `cdr` ( `calldate` datetime NOT NULL default ’0000-00-00 00:00:00′, `clid` varchar(80) NOT NULL default ”, `src` varchar(80) NOT NULL default ”, `dst` varchar(80) NOT NULL default ”, `dcontext` varchar(80) NOT NULL default ”, `channel` varchar(80) NOT NULL default ”, `dstchannel` varchar(80) NOT NULL default ”,

Read more