Skip to content

Instantly share code, notes, and snippets.

@mina86

mina86/date-header.c

Created Jan 16, 2010
Embed
What would you like to do?
#include <stdio.h>
#include <string.h>
int main(void) {
char tmp[128];
while (scanf(" %128s ", tmp) == 1) {
if (!strcmp("Date:", tmp) && fgets(tmp, sizeof tmp, stdin)) {
fputs(tmp, stdout);
return 0;
}
}
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment