File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ This work is released to the public domain under the CC0 (Creative Commons) license terms: https://creativecommons.org/publicdomain/zero/1.0/legalcode 
Original file line number Diff line number Diff line change 1+ ### An alias for the tree command  
2+ 
3+ Author: Unknown
4+ Submitter: Alan Young (harleypig)
5+ 
6+ If the tree command does not exist on your system, this alias will fake it.
7+ 
8+ I got this from a co-worker a long time ago. I don't remember when, or who it was. If it was you, let me know and I'll update this.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ #  I got this from a co-worker many moons ago. Unfortunately, I don't remember
4+ #  who. Basically, if a tree program is not installed, fake it with this.
5+ 
6+ if  !  command  -v tree >  /dev/null 2>&1 ;  then 
7+ 
8+   alias  tree=" find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" 
9+ 
10+ fi 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments