Zuletzt aktiv 10 months ago

這段 Bash 指令使用 find 指令在當前目錄(.)及其子目錄中 搜尋所有 .py(Python)檔案,並對每個找到的檔案執行 顯示檔名並輸出其內容。這適用於 快速查看專案中的 Python 檔案,方便 程式碼審查、備份或檢查腳本內容。

timmy hat die Gist bearbeitet 10 months ago. Zu Änderung gehen

Keine Änderungen

timmy hat die Gist bearbeitet 10 months ago. Zu Änderung gehen

Keine Änderungen

timmy hat die Gist bearbeitet 1 year ago. Zu Änderung gehen

1 file changed, 2 insertions

find_python_files_and_display_content.sh(Datei erstellt)

@@ -0,0 +1,2 @@
1 + #!/bin/bash
2 + find . -name "*.py" -exec sh -c 'echo "=== {} ==="; cat "{}"; echo ""' \;
Neuer Älter