#include <stdio.h>

main (int argc, char **argv)
{
    char fullname[128];
    static char buff[128];
    FILE *f;
    int len, var = 0;

    argc--; argv++;
    if (argc < 1) exit(1);
    if (!strcmp(*argv, "-v")) {
	var = 1;
	argc--; argv++;
    }
    if (argc < 1) exit(1);
	
    sprintf(fullname, "ENV:%s", *argv);
    if (!(f = fopen(fullname, "r"))) exit(1);
    len = fread(buff, 1, sizeof(buff) - 1, f);
    fclose(f);
    if (len > 0 && buff[len - 1] == '\n') len--;
    buff[len] = '\0';
    if (var)
	printf ("%s=", *argv);
    puts(buff);
    exit(0);
}
