-
Notifications
You must be signed in to change notification settings - Fork 640
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
11 changed files
with
44,117 additions
and
17 deletions.
There are no files selected for viewing
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
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,21 @@ | ||
#!/bin/bash | ||
|
||
# 设置目标目录 | ||
target_directory="packages/site/examples" | ||
|
||
# 设置合并后的文件名 | ||
merged_file="merged_demo_code.txt" | ||
|
||
# 删除已存在的合并文件 | ||
rm -f "$merged_file" | ||
|
||
# 遍历目标目录下的所有.md文件 | ||
find "$target_directory" -type f \( -name "*.ts" -o -name "*.js" \) -print0 | while IFS= read -r -d $'\0' file; do | ||
# 输出当前处理的文件名 | ||
echo "Merging $file" | ||
|
||
# 使用cat命令将文件内容追加到合并文件中 | ||
cat "$file" >> "$merged_file" | ||
done | ||
|
||
echo "Merge complete. Merged file: $merged_file" |
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,21 @@ | ||
#!/bin/bash | ||
|
||
# 设置目标目录 | ||
target_directory="packages/site/docs" | ||
|
||
# 设置合并后的文件名 | ||
merged_file="merged.md" | ||
|
||
# 删除已存在的合并文件 | ||
rm -f "$merged_file" | ||
|
||
# 遍历目标目录下的所有.md文件 | ||
find "$target_directory" -type f -name "*.md" -print0 | while IFS= read -r -d $'\0' file; do | ||
# 输出当前处理的文件名 | ||
echo "Merging $file" | ||
|
||
# 使用cat命令将文件内容追加到合并文件中 | ||
cat "$file" >> "$merged_file" | ||
done | ||
|
||
echo "Merge complete. Merged file: $merged_file" |
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
Oops, something went wrong.