Suppress dot when printing status of a service with systemctl
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
How do I suppress the dot that gets printed to the left of the service name when I run systemctl status XXX
? I'd like to save the output of this command to a bash variable and print it. The presence of the dot in the output causes my script to fail, most probably because the dot is a unicode char.
# systemctl status network
â network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: active (exited) since Thu 2018-10-11 09:16:29 PDT; 6h ago
Docs: man:systemd-sysv-generator(8)
Oct 11 09:16:24 172.100.139.200 systemd[1]: Starting LSB: Bring up/down networking...
Oct 11 09:16:24 172.100.139.200 network[1376]: Bringing up loopback interface: [ OK ]
Oct 11 09:16:28 172.100.139.200 network[1376]: Bringing up interface eth0: [ OK ]
Oct 11 09:16:29 172.100.139.200 systemd[1]: Started LSB: Bring up/down networking.
systemd
add a comment |Â
up vote
0
down vote
favorite
How do I suppress the dot that gets printed to the left of the service name when I run systemctl status XXX
? I'd like to save the output of this command to a bash variable and print it. The presence of the dot in the output causes my script to fail, most probably because the dot is a unicode char.
# systemctl status network
â network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: active (exited) since Thu 2018-10-11 09:16:29 PDT; 6h ago
Docs: man:systemd-sysv-generator(8)
Oct 11 09:16:24 172.100.139.200 systemd[1]: Starting LSB: Bring up/down networking...
Oct 11 09:16:24 172.100.139.200 network[1376]: Bringing up loopback interface: [ OK ]
Oct 11 09:16:28 172.100.139.200 network[1376]: Bringing up interface eth0: [ OK ]
Oct 11 09:16:29 172.100.139.200 systemd[1]: Started LSB: Bring up/down networking.
systemd
Perhapssystemctl status network | tr -d 'âÂÂ'
?
â Doug O'Neal
4 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How do I suppress the dot that gets printed to the left of the service name when I run systemctl status XXX
? I'd like to save the output of this command to a bash variable and print it. The presence of the dot in the output causes my script to fail, most probably because the dot is a unicode char.
# systemctl status network
â network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: active (exited) since Thu 2018-10-11 09:16:29 PDT; 6h ago
Docs: man:systemd-sysv-generator(8)
Oct 11 09:16:24 172.100.139.200 systemd[1]: Starting LSB: Bring up/down networking...
Oct 11 09:16:24 172.100.139.200 network[1376]: Bringing up loopback interface: [ OK ]
Oct 11 09:16:28 172.100.139.200 network[1376]: Bringing up interface eth0: [ OK ]
Oct 11 09:16:29 172.100.139.200 systemd[1]: Started LSB: Bring up/down networking.
systemd
How do I suppress the dot that gets printed to the left of the service name when I run systemctl status XXX
? I'd like to save the output of this command to a bash variable and print it. The presence of the dot in the output causes my script to fail, most probably because the dot is a unicode char.
# systemctl status network
â network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: active (exited) since Thu 2018-10-11 09:16:29 PDT; 6h ago
Docs: man:systemd-sysv-generator(8)
Oct 11 09:16:24 172.100.139.200 systemd[1]: Starting LSB: Bring up/down networking...
Oct 11 09:16:24 172.100.139.200 network[1376]: Bringing up loopback interface: [ OK ]
Oct 11 09:16:28 172.100.139.200 network[1376]: Bringing up interface eth0: [ OK ]
Oct 11 09:16:29 172.100.139.200 systemd[1]: Started LSB: Bring up/down networking.
systemd
systemd
asked 6 mins ago
linuxfan
17710
17710
Perhapssystemctl status network | tr -d 'âÂÂ'
?
â Doug O'Neal
4 mins ago
add a comment |Â
Perhapssystemctl status network | tr -d 'âÂÂ'
?
â Doug O'Neal
4 mins ago
Perhaps
systemctl status network | tr -d 'âÂÂ'
?â Doug O'Neal
4 mins ago
Perhaps
systemctl status network | tr -d 'âÂÂ'
?â Doug O'Neal
4 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474933%2fsuppress-dot-when-printing-status-of-a-service-with-systemctl%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Perhaps
systemctl status network | tr -d 'âÂÂ'
?â Doug O'Neal
4 mins ago