Created
          March 17, 2019 15:23 
        
      - 
      
- 
        Save zhimoe/de9b827a0e3eeab8f33a78a153e2cb5d to your computer and use it in GitHub Desktop. 
    bash-prepend-text-into-file
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | for i in *; do if [ ${i: -3} == ".md" ]; | |
| then echo "--- | |
| title: '"${i::-3}"' | |
| date: 2019-01-01 | |
| tags: | |
| - java | |
| - code | |
| --- | |
| $(cat $i)" > $i; | |
| fi; done; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment