Q: Include header in multiple .csv file with cat linux I need to include a .csv header in multiple .csv files at once by switching the name to:

originalname1c.csv, originalname2c.csv, originalname3c.csv

Currently, the procedure is done as follows:
cat header.csv originalname1.csv > originalname1c.csv
cat header.csv originalname2.csv > originalname2c.csv
cat header.csv originalname3.csv > originalname3c.csv

Etc.
Is it possible to add header to multiple files as in the above example in a single command?
additional one: what if the filenames were random? keeping the rule from: anyname.csv to anynamec.csv

A: In any POSIX compliant shell
for f in *.csv; do
  cat header.csv "$f" > "${f%.csv}c.csv"
done

The ${f%.csv} construct removes the .csv extension from the expansion of $f so that you can add back c.csv to the basename.
