I'm trying to create a script which checks updates for apache and some other web server stuff for custom web panel and I'm having hard time while grep'ing current installed version of apache.
I tried to use that command to grep version of apache but the output is not containing numbers.
My command:
/usr/local/apache/bin/httpd -v | grep "version" | cut -d " " -f 3
And I'm getting this output:
Apache/2.4.46
And I need just 2.4.46 part of this thing.
BTW. There is the output of full /usr/local/apache/bin/httpd -v command:
Server version: Apache/2.4.46 (Unix)
Server built: Aug 20 2020 22:34:56
I'm not familiar with linux that's not my active job. I hope someone will figure it out for me. Thanks.