Skip to content

Instantly share code, notes, and snippets.

@HappyStinson
HappyStinson / combine_ics.sh
Last active January 8, 2026 18:33
Combine ICS Files. This shell script combines multiple .ics calendar files into a single .ics file. It checks for existing .ics files in the directory, extracts the events from each file, and compiles them into one output file named combined.ics. Features: Automatically detects and processes all .ics files in the current directory. Retains the h…
#!/bin/bash
# Output file where all .ics files will be combined
OUTPUT_FILE="combined.ics"
# Check if any .ics files exist in the directory
if ls *.ics 1> /dev/null 2>&1; then
echo "Combining all .ics files into $OUTPUT_FILE..."
# Start with an empty output file (or create a new one)