Given a file that contains a log (timestamp, customer id, page id), please write a script to parse it and output the list of pages visited by each customer.
(给定一个包含日志的文件(时间戳,客户ID,页面ID),请编写脚本进行解析并输出每个客户访问的页面列表。)
Input CSV File:
(输入CSV文件:)
Time, Customer ID, Page ID 1, C1, P1 2, C2, P2 3, C3, P3 4, C2, P1 5, C2, P3 6, C2, P2 7, C1, P3 8, C1, P2 9, C3, P1 10, C2, P1 11, C2, P3 12, C2, P2 13, C1, P1 14, C1, P3 15, C1, P2
Example execution of script.
(脚本执行示例。)
The Customer ID must be passed as a parameter. (客户ID必须作为参数传递。)
That is, ./script "C1"
(也就是说,。/ ./script "C1"
)
Output:
(输出:)
P1, P3, P2, P1, P3, P2