← Questions

Report a user's license usage from a log file

0
AmazonCodingLast asked Sep 2025

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.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding