Skip to content

Instantly share code, notes, and snippets.

@nitanshu
Last active August 7, 2019 08:55
Show Gist options
  • Save nitanshu/9c556929fabac274c254a4e893ca08b1 to your computer and use it in GitHub Desktop.
Save nitanshu/9c556929fabac274c254a4e893ca08b1 to your computer and use it in GitHub Desktop.
It will prepend lines of text in all the files with specific extension
for file in $(find . -name "*.ts"); do
echo Processing $file
cat license.txt $file > $file.modified
mv $file.modified $file
done
@nitanshu
Copy link
Author

nitanshu commented Aug 7, 2019

Take this file and put in the folder where you want all special extension file to have "text" stored in license.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment