AMD Interview Question

Unexpected question: write a script to perform pattern matching with certain keywords for each line in a file.

Interview Answers

Anonymous

May 22, 2013

use `sed` command to perform the pattern matching for each line, and a bash script wrapping around to parse the file. It is fairly easy, but for people who is not familiar to scripting language, sed, awk...etc, it may be a trouble.

1

Anonymous

Jun 19, 2013

you can also use perl regular expressions