^
в течение начала строки.
^$
говорят начало строки, конец строки $
, ни с чем промежуточным.
с помощью этого regex можно найти пустые строки и удалить/исключить пустую строку
например.
grep -Ev '^$|^#' /etc/sudoers
Это исключит пустую строку и строку, которая является запуском от хеша (#)
Не бойтесь, что это жесткое заявление sed
. Но она должна уважать каскадирование. Вот она в одной строке:
sed -e 's/,/|/g;:a;s/{\([^{}]*\)|\([^{}]*\)}/{\1,\2}/g;ta;s/{\([^{}]*\)}/<\1>/g;ta;:b;s/<\([^<>]*\)>/{\1}/g;tb' file
Вот комментированная версия:
sed -e '
s/,/|/g; #replaces all commas (,) with pipes (|)
:a; #sets a label called a
s/{\([^{}]*\)|\([^{}]*\)}/{\1,\2}/g; #replaces {a|b|c} with {a,b|c}
ta; #go back to the label `a` and repeat the
#prevous part until there is nothing more
#to replace: when {a|b|c} became {a,b,c}
s/{\([^{}]*\)}/<\1>/g; #replace {...} with <...>
ta; #go back to label a again until all {} are
#replaces by <>
:b; #create a new label called b
s/<\([^<>]*\)>/{\1}/g; #replace <...> back to {...}
tb; #and back to label b to repeat the previous
#part
' file
С тем, что я получил желаемый выход.
-121--129064-Все службы необходимо загрузить и проанализировать перед их запуском, и ваша служба недоступна на ранней стадии процесса загрузки, когда systemd анализирует все службы, поскольку она находится в другом разделе.
Чтобы решить эту проблему, сохраните локальные услуги в /etc/systemd/system/
или создайте пакет для вашего распространения и поместите их в /usr/lib/systemd/system/
The following packages are in a mess due to serious problems during
installation. They must be reinstalled for them (and any packages
that depend on them) to function properly:
python-lxml pythonic binding for the libxml2 and libxslt libraries
python-aptdaemon Python 2 module for the server and client of aptdaemon
python3-uno Python-UNO bridge
python-dbus simple interprocess messaging system (Python interface)
python-defer Small framework for asynchronous programming (Python 2)
python-gi Python 2.x bindings for gobject-introspection libraries
python3-speechd Python interface to Speech Dispatcher
python3-xdg Python 3 library to access freedesktop.org standards
python-aptdaemon.gtk3widgets Python 2 GTK+ 3 widgets to run an aptdaemon clien
python3-requests elegant and simple HTTP library for Python3, built for hu
python-lazr.uri library for parsing, manipulating, and generating URIs
python3-crypto cryptographic algorithms and protocols for Python 3
python3-louis Python bindings for liblouis
python-cairo Python bindings for the Cairo vector graphics library
python-keyring store and access your passwords safely
python-gobject-2 deprecated static Python bindings for the GObject library
python3-chardet universal encoding detector
python3-lxml pythonic binding for the libxml2 and libxslt libraries
python3-cairo Python 3 bindings for the Cairo vector graphics library
python-gtk2 Python bindings for the GTK+ widget set
python3-dirspec Python User Folders Specification Library
python-chardet universal character encoding detector
python-cupshelpers Python modules for printer configuration with CUPS
dh-python Debian helper tools for packaging Python libraries and ap
python-crypto cryptographic algorithms and protocols for Python
python-dirspec Python User Folders Specification Library
python3-six Python 2 and 3 compatibility library (Python 3 interface)
python-lockfile file locking library for Python
python-apt Python interface to libapt-pkg
python3-oauthlib generic, spec-compliant implementation of OAuth for Pytho
python3-xkit library for the manipulation of xorg.conf files (Python 3
python-httplib2 comprehensive HTTP client library written for Python
python-debian Python modules to work with Debian-related data formats
python3-urllib3 HTTP library with thread-safe connection pooling for Pyth
python-lazr.restfulclient client for lazr.restful-based web services
python-configglue Glues together optparse.OptionParser and ConfigParser.Con
python-launchpadlib Launchpad web services client library
Таким образом, сообщение ясно, вы должны переустановить все эти пакеты, а затем перенастроить все остальное:
sudo apt-get --reinstall install python-lxml python-aptdaemon python3-uno python-dbus python-defer python-gi python3-speechd python3-xdg python-aptdaemon.gtk3widgets python3-requests python-lazr.uri python3-crypto python3-louis python-cairo python-keyring python-gobject-2 python3-chardet python3-lxml python3-cairo python-gtk2 python3-dirspec python-chardet python-cupshelpers dh-python python-crypto python-dirspec python3-six python-lockfile python-apt python3-oauthlib python3-xkit python-httplib2 python-debian python3-urllib3 python-lazr.restfulclient python-configglue python-launchpadlib
А затем сконфигурируйте/перенастройте все пакеты:
sudo dpkg --configure -a
sudo apt-get install -f
О, я также рекомендую вам обновить до надежных, чтобы вы могли использовать последнюю версию всех пакетов.
Попробуйте это:
rm $HOME/.dbus/session-bus/*
-121--44245- Вдохновленный другим ответом на другой вопрос , я предлагаю использовать proxychains-ng (которая является более новой версией proxychains ).
proxychains.conf
в текущем каталоге или по адресу ~/.proxychains/proxychains.conf
или по адресу /etc/proxychains.conf
.
-f
или переменную среды PROXYCHAINS _ CONF _ FILE
. В файле proxychains.conf
добавьте:
[Список ProxyList]
socks5 127.0.0.1 1234
Запустите ssh -D 1234 your_host_b
. Это заставит ssh прослушивать порт 1234 на локальном хосте и использовать удаленный узел в качестве прокси-сервера SOCKS.
ssh -ND 1234 your_host_b
. -N
предотвратит выполнение команды ssh на удаленном сервере (т.е. не откроет оболочку). proxychains4 yycommandhere yourparametershere
. См. несколько примеров:
proxychains4 wget -O - http ://ifconfig.co/
proxychains4 -q ссылки http ://ifconfig.co/
У меня была очень похожая проблема. Похоже, это происходит от использования python3
вместо python2.7
У меня был /usr/bin/python
, связанный с python3 (я изменил ссылку после установки python3 для большего удобства, похоже, что наложение псевдонимов - гораздо лучшая идея).
В любом случае, после отсоединения и повторного соединения с python2.7
модернизаций сработал нормально.