Skip to content

Instantly share code, notes, and snippets.

@pavelskipenes
Last active July 6, 2022 01:17
Show Gist options
  • Save pavelskipenes/de61dbbbe273e1d60183fa1d6f2fa4a0 to your computer and use it in GitHub Desktop.
Save pavelskipenes/de61dbbbe273e1d60183fa1d6f2fa4a0 to your computer and use it in GitHub Desktop.
echo "<?php\n\ndeclare(strict_types=1);\n\nnamespace\n\n\\App;" | tee -a $(find ./ -name "*.php")
@pavelskipenes
Copy link
Author

Example:

<?php

declare(strict_types=1);

namespace \App;

Inserts following code above into all .php files recursively from current working directory.
another alternative would be to cat some_template.txt | tee ...

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