Amazon·Software Engineer·Technical Phone Screen
- Write a shell script called script.sh that takes a username and a file path as arguments, then prints a single line in the format: <timestamp> <license> <user@hostname>. The username and hostname should be used to build the user@hostname part, the license value should be parsed from the given file, and the script should handle missing arguments, nonexistent files, and permission errors.
“I thought this was going to be a five-minute thing and then I got stuck on the timestamp format because nobody told me what format to use.”