https://github.com/syncom/sudobash
A Sudoku Solver in bash
https://github.com/syncom/sudobash
bash sudoku-solver
Last synced: 4 months ago
JSON representation
A Sudoku Solver in bash
- Host: GitHub
- URL: https://github.com/syncom/sudobash
- Owner: syncom
- Created: 2012-03-31T00:00:09.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T00:46:21.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T22:13:13.552Z (about 1 year ago)
- Topics: bash, sudoku-solver
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Sudoku Solver in Bash
This is a Sudoku solver I wrote a long long time ago out of pure boredom, in
Bourne-again shell (Bash). It uses tools like `echo`, `grep`, and `sed`, and
runs really slow. But who cares if there is some time to kill!
To use it, put all 81 numbers in the puzzle, from the top row to the bottom with
empty cells replaced by zeros, into the first line of a text file, say
`sample_puzzle.txt`, and from shell prompt, run
```bash
./sudobash sample_puzzle.txt
```
Example:
```bash
$ echo "000381000123000600500007030204006080006000200090100306030800005005003427000045000" > sample_puzzle.txt
$ ./sudobash sample_puzzle.txt
647381592123459678589267134214536789356798241798124356431872965865913427972645813
```