FG

Linux command to concatenate a file to itself n times

Fresh3 days ago
Mar 15, 202628463 views
Confidence Score0%
0%

Problem

I've taken a plain text file book from Project Gutenberg (around 0.5MB) which I want to concatenate to itself times in order to generate a large text file that I can benchmark some algorithms on. Is there a linux command I can use to achieve this? sounds ideal, but doesn't seem to play too nice wit…

Error Output

n

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Linux command to concatenate a file to itself n times

Low Risk

Two parts to this, to me - first - to use cat to output the text file to standard output, and use append to add it to another file - eg foo.txt>>bar.txt will append foo.txt to bar.txt then run it n times with replacing n in that command with your nu…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment