简体   繁体   English

bash html自动化脚本一次运行

[英]bash html automation scripts running at once

i'm attempting to use bash scripts to create a web page, have no issue doing that at all. 我正在尝试使用bash脚本创建网页,完全没有问题。 The problem is I need to get each part of the site to be added individually eg the first file (main.html) needs to have navigation and content added which are separate scripts. 问题是我需要分别添加站点的每个部分,例如,第一个文件(main.html)需要添加导航和内容,它们是单独的脚本。 My problem is trying to get them to run all at once using the command line. 我的问题是尝试使它们使用命令行一次全部运行。

I tried: 我试过了:

cat main.html | navigation 

and even tried adding it to a new file eg 甚至尝试将其添加到新文件中

cat main.html | navigation > mainnew.html

I've tried adding the file extension to navigation, but i'm a little unsure how that affects it as it doesn't seem to work no matter what file type it is (.sh/.html/.txt). 我曾尝试将文件扩展名添加到导航中,但是我有点不确定这会如何影响它,因为无论它是哪种文件类型(.sh / .html / .txt),它似乎都不起作用。

Any direction you can point me in would help. 您能指出我的任何方向都会有所帮助。

thanks 谢谢

Ah! 啊! I figured it out. 我想到了。

cat main.html | navigation > mainnew.html

should be 应该

cat main.html navigation.html > mainnew.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM