$ sed -E 'h;s/.*(http[^ ]*).*/\1/;s/.*\///;H;x;s/\n//' file
989155126903533568|2018-04-25|14:52:14|GMT|report|"""Умственно отстал"" was checked - http://steamcommunity.com/profiles/76561198402636850 …"|0|0|0|76561198402636850
989154874184085505|2018-04-25|14:51:14|GMT|report|"""Clavicus Vile"" was checked (8 reports) - http://steamcommunity.com/profiles/76561198006267103 …"|0|0|0|76561198006267103
989154622890823685|2018-04-25|14:50:14|GMT|report|"""~TAKA~"" was checked (3 reports) - http://steamcommunity.com/profiles/76561198161608591 …"|0|0|0|76561198161608591
Скрипт sed
с аннотациями:
h # save a copy of the current line in the "hold space"
s/.*(http[^ ]*).*/\1/ # remove everything but the URL
s/.*\/// # trim the URL so that only the last bit (the number) is left
H # add that last bit to the "hold space" (with a newline in-between)
x # swap the "hold space" and the "pattern space"
s/\n// # delete that inserted newline
# (implicit print at the end)
Это предполагает, что URL-адрес всегда является только URL-адресом в строке и что он всегда разделяется символом пробела.
Решение этой проблемы было найдено на :https://forums.linuxmint.com/viewtopic.php?t=143265
Чтобы исправить это в Manjaro KDE, вам нужно перейти на:
Клавиатура> Дополнительно> Разные параметры совместимости> Установите флажок :«Num lock on :digits; Shift для клавиш со стрелками. Num lock off :клавиши со стрелками (как в Windows)