Cela marche:
$ sudo gitlab-runner list 2>&1 | grep 'Token'
Python 2.7.14 Executor=docker Token=bccdbf31ef6bc74b2ae4980d8eccea URL=http://something
Docker Executor=docker Token=5b06f034f48d3543848d7d209ce80c URL=http://something
Ansible Executor=docker Token=e2215647f2c9981c8d74abaf324983 URL=http://something
Cela ne veut pas:
$ sudo gitlab-runner list 2>&1 | grep 'Token='
(empty)
Pourquoi?
J'utilise:
$ grep --version
grep (GNU grep) 2.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
=
signe peut être différent de ce que vous attendez, peut-être un caractère Unicode. Quelle est la sortie desudo gitlab-runner list 2>&1 | grep -o 'Token..' | od -c
?