Report a user's license usage from a log file
Write a command-line script called as ./script.sh <username> <log_file>. Each log line looks like timestamp license user@hostname. Print the result the interviewer asks for about that user's license usage, with clear output and sensible errors for bad arguments or missing files. Follow-up: queries repeat, so make them faster with a cache or a hash map built from the log.
No answer yet. Write the first one; the best answer gets endorsed.
