Answer the question
In order to leave comments, you need to log in
Is it possible to print the value of the http variable?
Good afternoon, is it possible to somehow display the value of the DocumetRoot variable from httpdb File : /etc/httpd/conf/httpd.conf
If I do grep on the file, it comes out
# cat /etc/httpd/conf/httpd.conf | grep DocumentRoot
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"
# access content that does not live under the DocumentRoot
/var/www/html
what to assign to a variable later
Answer the question
In order to leave comments, you need to log in
cat 111.txt | grep ^DocumentRoot | egrep -o '/.+[^"]'
/var/www/html
^
- the beginning of the line, -o
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question