This repository contains a bash script for counting tokens in text files and estimating the cost based on a per-million-token rate.
-
Make the script executable:
chmod +x wordcount.sh
-
Run the script with file paths as arguments:
./wordcount.sh path/to/file1.txt path/to/file2.txt
-
Enter the cost per million tokens when prompted.
-
The script will output token counts for each file and the total, along with the estimated cost in cents.
This project is licensed under the MIT License - see the LICENSE file for details.