#include #include int main(void) { char *filename = NULL; size_t linesize = 0; ssize_t linelen = getline(&filename, &linesize, stdin); if (linelen < 0) err(1, "getline"); FILE *fh = fopen(filename, "r"); if (!fh) err(1, "fopen '%s'", filename); }