简体   繁体   中英

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. 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. 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).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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