Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6957955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:04:41+00:00 2026-05-27T15:04:41+00:00

I am trying to create a html out of several html files, but that’s

  • 0

I am trying to create a html out of several html files, but that’s not my problem because this is working fine. The Problem is, that the Code I have written so far is writing all the several html files into one single html, but I only want to combine 5 html into one. If the one html file, which will be generated contains more then 5 html files, then it should create a new html file and so one…get it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:04:41+00:00Added an answer on May 27, 2026 at 3:04 pm

    This assumes that you want t1.html, t2.html etc.

    idx=0
    counter=0
    target=
    for file in *; do
        if [ $((counter%5)) -eq 0 ]; then
            idx=$((idx+1))
            target=t${idx}.html
        fi
        # write to $target
        counter=$((counter+1))
    done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a html file out of a database, and I
I am trying to create some dynamic html out of some data from db.
I am trying to create a modular html document that employs smooth scrolling. If
I'm trying to create text in html, that once clicked, the the value of
This is the HTML I'm trying to create: <td> Tiana is <select name=U4>...</select> keen
I am trying to create a for loop that will parse out different elements
I am trying to create a function that handles the 'keyup' event for several
Not much good in jQuery/javascript but trying to create a small game. here is
I am trying to create a simple image slideshow that fades in and out
I'm trying to create a master index file for a bunch of HTML files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.