Skip to content

Instantly share code, notes, and snippets.

@CristianDeluxe
CristianDeluxe / chatgpt.sh
Last active March 27, 2024 14:41
Paste ChatGPT Code. This script is designed to traverse a specified folder and its subdirectories, printing the contents of all files found inside, excluding certain folders and files based on predefined criteria. You can then paste this code into an AI chat like ChatGPT
#!/bin/bash
# Script: chatgpt.sh
# Description: Traverse through a specified folder, excluding certain folders and files, and print the contents of all non-excluded files.
# Example: ./chatgpt.sh /path/to/folder
# Check if a folder path is provided
if [ -z "$1" ]; then
echo "Please provide a folder path."
exit 1