menuimage

Description

Usage

Example

Options

Notes

License

Changelog

Download

Donation

My_Other_Sites

My_Programs

Comments

csv2html v0.9.2 [13 Apr 2026] - by Dominic

Description

Converts tabular data to html <table> format for viewing with a browser or for use in emails with content type 'text/html'. Adapted from
https://gist.github.com/jschaub30/c67cf9e214d83accd4db - kudos.

Usage

csv2html [options] [csv_file,or blank/dash for stdin] [source field separator(default is comma, tilde is not allowed)] [is-a-table-line regex
identifier(default '.')] [not-a-table-line regex identifier]

Example

echo -e "A B C\n1 Fred_Bloggs 123_Acacia_Ave"|csv2html -f - " "

Options

-f do not display help on null input (recommended: use this)
-h show this help
-l show changelog
-n do not treat first line of each table as a header line
-t TIME add a timeout for any piped input, specify TIME as for command 'timeout' (default: 0.1 (seconds))

Notes

1. If required, you can specify tab separator on command line with $'\t'
2. A regex separator should work but may need escaping, but tilde ('~') is not allowed

License

Copyright © 2026 Dominic Raferd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

Changelog

0.9 [31 Dec 2025] - add -f option
0.8 [17 Dec 2025] - show help if no param1 nor piped input (before timeout), add -t option for longer timeout if required
0.7 [29 Jan 2025] - bug fix for heading html, point out in help that tilde separator is not allowed
0.6 [16 Jan 2024] - add 4th param
0.5 [12 Jul 2021] - bugfix (replace awk script that sequences number lines)
0.4 [18 May 2021] - a couple of bugfixes
0.3 [06 May 2021] - add 3rd param, can tablify multiple tables and only those tables in a file
0.2 [18 Dec 2019] - add changelog, better help
0.1 [28 Sep 2019] - initial version

Download csv2html

Donation

I have provided this software free gratis and for nothing. If you would like to thank me with a contribution, please let me know and I will send you a link. Thank you!

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run under GNU/Linux from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written and tested on an x86-based Linux server, they should run on a Raspberry Pi, and many can run under Windows using Windows Subsystem for Linux (WSL) or Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Miscellaneous Programs

Comments

This section is closed. If you have a question, please submit it by email, thank you.

No comments yet for '/programs/help/csv2html.sh.php'