Если в ядре включена принудительная выгрузка ( zgrep FORCE_UNLOAD /proc/config.gz
говорит = y
), вы можете rmmod -f
проблемный модуль ядра, чтобы принудительно выгрузить его.
Согласно патчу , который позволяет это , это только для разработчиков ядра и отчаявшихся людей.
Лучше всего, вероятно, выяснить, почему модуль используется и каким процессом, но, по крайней мере, принудительная выгрузка должна позволить перезагрузить модуль снова.
sed
раствор:
sed -E 's/.*\/profiles\/([0-9]+).*/&\1/' file.csv
Пример вывода:
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 -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-адресом в строке и что он всегда разделяется символом пробела.
Сawk
:
awk -F'["/]' '{print $0$(NF-1)}' infile > outfile
print
вся строка $0
и предпоследнее поле $(NF-1)
, где разделителем полей -F
является либо набор '[...]'
кавычки "
, либо косая черта /
из infile
и сохранение результата в outfile
.