-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
2,414 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Create a temporary file to store the combined notes | ||
temp_file=$(mktemp) | ||
|
||
# Use find to search for text files recursively in subdirectories | ||
find . -type f -name "*.txt" | while read -r file; do | ||
# Get the basename of the parent directory | ||
parent_dir=$(basename "$(dirname "$file")") | ||
|
||
# Get the basename of the file (without the extension) | ||
base=$(basename -s .txt "$file") | ||
|
||
# Add the header line to the temporary file | ||
echo -e "\n------------------------------\n" >> "$temp_file" | ||
echo "# $parent_dir $base" >> "$temp_file" | ||
echo -e "\n------------------------------\n" >> "$temp_file" | ||
|
||
# Append the content of the original file to the temporary file | ||
cat "$file" >> "$temp_file" | ||
done | ||
|
||
# Append the content of the temporary file to the output file | ||
cat "$temp_file" >> "combined_notes.txt" | ||
|
||
# Clean up the temporary file | ||
rm "$temp_file" |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.