我需要创建一个脚本来查看每一天和发生的损失时间。
- 时间
- 上午/下午
- 轮盘赌庄家的名字
- 轮盘赌庄家的姓氏
例如,如果在3月10日下午2点发生了亏损,您将编写一个脚本来查找在该特定日期和时间工作的轮盘赌庄家。
$ cat 0310_Dealer_schedule
Hour AM/PM BlackJack_Dealer_FNAME LAST Roulette_Dealer_FNAME LAST Texas_Hold_EM_dealer_FNAME LAST
12:00:00 AM Izabela Parrish Marlene Mcpherson Madina Britton
01:00:00 AM Billy Jones Saima Mcdermott Summer-Louise Hammond
02:00:00 AM Summer-Louise Hammond Abigale Rich John-James Hayward
03:00:00 AM John-James Hayward Evalyn Howell Chyna Mercado
04:00:00 AM Chyna Mercado Cleveland Hanna Katey Bean
05:00:00 AM Katey Bean Billy Jones Evalyn Howell
06:00:00 AM Evalyn Howell Saima Mcdermott Cleveland Hanna
07:00:00 AM Cleveland Hanna Abigale Rich Billy Jones
08:00:00 AM Rahima Figueroa Billy Jones Madina Britton
09:00:00 AM Marlene Mcpherson Cleveland Hanna Summer-Louise Hammond
10:00:00 AM Izabela Parrish Madina Britton John-James Hayward
11:00:00 AM Madina Britton Summer-Louise Hammond Chyna Mercado
12:00:00 PM Summer-Louise Hammond John-James Hayward Katey Bean
01:00:00 PM John-James Hayward Chyna Mercado Evalyn Howell
02:00:00 PM Chyna Mercado Billy Jones Cleveland Hanna
03:00:00 PM Katey Bean Evalyn Howell Rahima Figueroa
04:00:00 PM Evalyn Howell Cleveland Hanna Billy Jones
05:00:00 PM Billy Jones Rahima Figueroa Summer-Louise Hammond
06:00:00 PM Rahima Figueroa John-James Hayward John-James Hayward
07:00:00 PM Marlene Mcpherson Chyna Mercado Chyna Mercado
08:00:00 PM Saima Mcdermott Billy Jones Katey Bean
09:00:00 PM Abigale Rich Evalyn Howell Billy Jones
10:00:00 PM Evalyn Howell Katey Bean Cleveland Hanna
11:00:00 PM Cleveland Hanna Billy Jones Rahima Figueroa
这是0310代理商时间表文件
我已经知道损失发生在这几天
0310_win_loss_player_data:05:00:00 AM
0310_win_loss_player_data:08:00:00 AM
0310_win_loss_player_data:02:00:00 PM
0310_win_loss_player_data:08:00:00 PM
0310_win_loss_player_data:11:00:00 PM
0312_win_loss_player_data:05:00:00 AM
0312_win_loss_player_data:08:00:00 AM
0312_win_loss_player_data:02:00:00 PM
0312_win_loss_player_data:08:00:00 PM
0312_win_loss_player_data:11:00:00 PM
0315_win_loss_player_data:05:00:00 AM
0315_win_loss_player_data:08:00:00 AM
0315_win_loss_player_data:02:00:00 PM
我的问题是如何编写脚本来使用grep、管道和awk隔离所需的数据
第一次
这是我一直在尝试的,我不确定如何使用特定的命令来获得我需要的结果。
1条答案
按热度按时间sshcrbum1#
下面将演示实现所需的逻辑类型。
下面提供的脚本按日期进行比较处理。如果您希望分析整个日期范围,则需要自己计算。
生成的会话输出如下所示: