from os import getenv
from selenium import webdriver
from selenium.webdriver.chrome.options import Options as Opt
opts = Opt()
if getenv('OS') != None :
p = getenv('HOMEDIR').replace('\\', '/')
else:
p = getenv('HOME')
opts.add_argument('--user-data-dir='+p)
Type "help", "copyright", "credits" or "license" for more information.
>>> from os import getenv
if getenv('OS') != None :
getenv('HOMEDIR')
# \Users\Serguei
else :
getenv('HOME')
# /home/sergueik
wrong file structure on disk: 1 path: UserData\Default\Code Cache\js
[0122/101624.098:ERROR:cache_util_win.cc(21)] Unable to move the cache: ╤шёЄхьх эх єфрхЄё эрщЄш єърчрээ√щ яєЄ№. (0x3)
(Системе не удается найти указанный путь)
opts.add_argument('--user-data-dir=UserData')
Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f9fcbc9baed1 mysql:5.7 "docker-entrypoint.s…" 11 minutes ago
docker exec -it mysql-server mysql -P 3306 -h localhost -uroot -ppassword -e "set @var = '1'; select @var ;"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
и тишинаdocker exec -it mysql-server mysql -P 3306 -h localhost -uroot -ppassword -e "set @var = '1'; select @var ;"
mysql: [Warning] Using a password on the command line interface can be insecure.
+------+
| @var |
+------+
| 1 |
+------+
sed -i 's|\([0-9][0-9][0-9][0-9]\)\-\(01\)\-\([0-9][0-9]\)|\3 Jan \1|' a.txt
sed -i 's|\([0-9][0-9][0-9][0-9]\)\-\(02\)\-\([0-9][0-9]\)|\3 Feb \1|' a.txt
...
и т.д. date --help | grep %c
%c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
вызывает сложности ?