https://github.com/pavanchhatpar/csv-to-sql-converter
A shell script that converts a csv file (Excel Sheet) to an SQL file that can be imported in a MySQL database
https://github.com/pavanchhatpar/csv-to-sql-converter
converter excel-to-sql shell-script
Last synced: about 1 month ago
JSON representation
A shell script that converts a csv file (Excel Sheet) to an SQL file that can be imported in a MySQL database
- Host: GitHub
- URL: https://github.com/pavanchhatpar/csv-to-sql-converter
- Owner: pavanchhatpar
- License: mit
- Created: 2017-09-13T13:44:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T05:27:57.000Z (about 4 years ago)
- Last Synced: 2025-02-25T09:13:54.575Z (about 2 months ago)
- Topics: converter, excel-to-sql, shell-script
- Language: Shell
- Size: 478 KB
- Stars: 40
- Watchers: 3
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - pavanchhatpar/csv-to-sql-converter - A shell script that converts a csv file (Excel Sheet) to an SQL file that can be imported in a MySQL database (Shell)
README
# Excel Sheet(CSV) to SQL
A shell script that converts a csv file (Excel Sheet) to an SQL file that can be imported in a MySQL database# Purpose
This script was created as a part of Operating Systems' mini project in my Third Year BE. In order to learn usage of various shell commands on Linux, Shell Script was chosen to implement this tool. Later on, it came as a handy tool to convert large amounts of data received for college tech fest events as Excel Sheets to developer friendly SQL files which could be easily used on websites and applications.# Features and Limitations
- Works only with .csv files which confine it to be used only on single sheet Excel Files.
- It assumes the `filename` as `table name` and `first row cells` are taken as `column names`
- The output filename is same as the input file but with an extension `sql`# Download
```bash
wget https://raw.githubusercontent.com/pavanchhatpar/csv-to-sql-converter/master/csv-sql.sh
chmod +x ./csv-sql.sh
```# Usage
```bash
$ sh csv-sql.sh .csv
```
# Screenshots
