grep doesn't work as I think -
i want check if parsoid service running. run command:
service --status-all|grep 'parsoid' but result is:
[ ? ] aliyun-rdate [ ? ] console-setup [ ? ] dns-clean [ ? ] irqbalance [ ? ] killprocs [ ? ] kmod [ ? ] mysql [ ? ] networking [ ? ] ondemand [ ? ] pppd-dns [ ? ] rc.local [ ? ] sendsigs [ ? ] umountfs [ ? ] umountnfs.sh [ ? ] umountroot why? shouldn't grep able speak parsoid screened out of it?
try:
service --status-all 2>&1|grep -o 'parsoid' 1 stdout , 2 stderr.
> redirection
& specifies follows file descriptor (not filename)
2>&1 redirects stderr stdout , stdout piped grep
note: service --status-all writes stderr.
Comments
Post a Comment