Created
September 14, 2023 14:58
-
-
Save rey/23fd4f87ddfa2c1a5a7b4c56e0cf4bc1 to your computer and use it in GitHub Desktop.
Quick and dirty script that loops thru every file in a folder and opens it in VSC, accepts changes and writes it to a done folder
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
#! /bin/bash | |
for file in *; do | |
cat ${file} > fileContent | |
/opt/homebrew/bin/code -w fileContent | |
newFileContent=`cat fileContent` | |
echo "${newFileContent}" > ${file} | |
mv ${file} done/. | |
rm fileContent | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment