如何从使用shell脚本的文件获取变量的值? [英] How do I get value of variable from file using shell script?
本文介绍了如何从使用shell脚本的文件获取变量的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个文件 post_check.ini
我需要设置的值:
There is a file post_check.ini
I need the value set for:
Max_value=2
如何获取值 2
from Max_value
?
How would I get the value 2
from Max_value
?
推荐答案
p>
try
grep -Po '(?<=Max_value=).*' post_check.ini
这篇关于如何从使用shell脚本的文件获取变量的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文