Random coding notes…
Python
datetime.datetime.now().strftime("%Y%m%d%H%M%S")
C (POSIX)
char ts_buf[64] = ""; struct timeval tv; struct tm *tm; gettimeofday(&tv, NULL); if ((tm = localtime(&tv.tv_sec)) != NULL) strftime(ts_buf, sizeof(ts_buf), "%Y%m%d%H%M%s", tm);
Ruby
File.open(FILENAME,'r') do |f| while line = f.gets # do something interesting end end