Skip to content

Instantly share code, notes, and snippets.

@smlb
Created February 4, 2014 22:10
Show Gist options
  • Save smlb/8813370 to your computer and use it in GitHub Desktop.
Save smlb/8813370 to your computer and use it in GitHub Desktop.
Modified version of lastsync.pl for Arch (I use it with conky)
#!/usr/bin/perl
use Date::Manip;
$date = `grep "pacman -Syu" /var/log/pacman.log | tail -n1 | cut -c 2- | cut -c-16`;
$date = &DateCalc("Jan 1, 1970 00:00:00 GMT",$date);
$date = UnixDate("$date","%A %H:%M");
print "$date";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment