Category Archives: python

Date manipulation in BASH, Perl, Python

To compare script language for administration tasks.

Using default installation on Linux (RHEL 5, 6), Solaris (10/9), Mac OS X (10.6.7). Implement in BASH, Perl, Python:
1. Find last string in text file, that match “TEST MESSAGE”
2. Get part of string with date
3. Convert human date to EPOCH format (in seconds)
4. Get current date in EPOCH
5. How many time ago was that message
Continue reading