Skip to content

Instantly share code, notes, and snippets.

@rey
Created September 14, 2023 14:58
Show Gist options
  • Save rey/23fd4f87ddfa2c1a5a7b4c56e0cf4bc1 to your computer and use it in GitHub Desktop.
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
#! /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