Last active
          March 15, 2022 14:01 
        
      - 
      
 - 
        
Save thydel/e0a8e54ba485defd51ff109a858dfc95 to your computer and use it in GitHub Desktop.  
    Link log from deep to flat
  
        
  
    
      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
    
  
  
    
  | top:; @date | |
| log := find /space/log -name '*.log' | |
| base := cut -d/ -f4- | |
| apache-links := sed -e 's;\(.*\)/\(.*\);ln -f /space/log/\1/\2 /space/log2/\1_\2;' | |
| php-links := sed -e 's;\(.*\)/php/\(.*\);ln -f /space/log/\1/\2 /space/log2/\1_php_\2;' | |
| apache := $(log) | grep -v /php/ | $(base) | $(apache-links) | |
| php := $(log) | grep /php/ | $(base) | $(php-links) | |
| apache php:; $($@) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment