Linux bash和html变量(导入和导出) [英] linux bash and html variables (import and export)
本文介绍了Linux bash和html变量(导入和导出)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有类似的东西:
var1 =名称
var2 =姓氏
我需要导出这些变量并将其导入到html文件中
任何想法?
解决方案
echo< html>< body> > index.html
echovar1 is $ var1< br> >> index.html
echovar2是$ var2< br> >> index.html
echo< / body>< / html> >> index.html
I've something like:
var1=name
var2=surname
I need export these variables and import it to html file
any idea?
解决方案
echo "<html><body>" > index.html
echo "var1 is $var1 <br>" >> index.html
echo "var2 is $var2 <br>" >> index.html
echo "</body></html>" >> index.html
这篇关于Linux bash和html变量(导入和导出)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文