apps started systemctl don't have access to the console.
You should use command line arguments rather than the console. But can just pipe an an input file as stdin, or depending on the shell you use, pipe an variable as input.
You should really learn some standard Linux commands.