我的输入文件是 xyz.txt,其中包含以下文本:
mp ofile test._GDFS_Lookup.Lookup_ReRun "$AI_SERIAL_LOOKUP"'/rerun_lookup.dat'
mp ofile All_other_Setups.RPT_REQ_ID'文件:'“$AI_SERIAL_LOOKUP”'/dtu_admin_test_lookup.dat'
我需要这个作为输出: $AI_SERIAL_LOOKUP"'/rerun_lookup.dat
文件:'“$AI_SERIAL_LOOKUP”'/dtu_admin_test_lookup.dat
答案1
$ cat xyz.txt
mp ofile test._GDFS_Lookup.Lookup_ReRun "$AI_SERIAL_LOOKUP"'/rerun_lookup.dat'
mp ofile All_other_Setups.RPT_REQ_ID'file:'"$AI_SERIAL_LOOKUP"'/dtu_admin_test_lookup.dat'
$ awk -F"[ :]" '{print $NF}' xyz.txt
"$AI_SERIAL_LOOKUP"'/rerun_lookup.dat'
'"$AI_SERIAL_LOOKUP"'/dtu_admin_test_lookup.dat'