Suppress dot when printing status of a service with systemctl

The name of the pictureThe name of the pictureThe name of the pictureClash 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.








share





















  • Perhaps systemctl status network | tr -d '●'?
    – Doug O'Neal
    4 mins ago














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.








share





















  • Perhaps systemctl status network | tr -d '●'?
    – Doug O'Neal
    4 mins ago












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.








share













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





share












share










share



share










asked 6 mins ago









linuxfan

17710




17710











  • Perhaps systemctl 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




Perhaps systemctl status network | tr -d '●'?
– Doug O'Neal
4 mins ago















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?