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 dt echo ${dt} How would i go about getting yesterdays date into a variable?

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 ”, `lastapp` varchar(80) NOT NULL default ”, `lastdata` varchar(80) NOT NULL default ”, `duration` int(11) NOT NULL default ’0′, `billsec` int(11) NOT NULL default ’0′, `disposition` varchar(45) NOT NULL default ”, `amaflags` int(11) NOT NULL default ’0′, `accountcode` varchar(20) NOT NULL default ”, `userfield` varchar(255) NOT NULL default ” ); ALTER TABLE `cdr` ADD `uniqueid` VARCHAR(32) NOT NULL default ”; ALTER TABLE `cdr` ADD INDEX ( `calldate` ); ALTER TABLE `cdr` ADD INDEX ( `dst` ); ALTER TABLE `cdr` ADD INDEX ( `accountcode` ); Configure Asterisk CDR Mysql vim /etc/asterisk/cdr.conf [general] enabled=yes vim /etc/asterisk/cdr_mysql.conf [global] hostname=localhost dbname=asterisk table=cdr password=”yourpassword” user=asterisk port=3306 ;sock=/tmp/mysql.sock ;userfield=1 vim /etc/asterisk/modules.conf load … Read more

Smart ring could give early alert for Covid-19 symptoms

Temperature data collected from a wearable device can be reliably used to detect the onset of a fever – a key symptom of Covid-19 – before the wearer feels it, according to a study from the University of California-San Diego.  The University of California researchers worked with MIT’s Lincoln Lab to assess the effectiveness of … Read more