Wednesday 5 December 2012

bash function to inspect col data files


Found this neat gem!

 #!/bin/bash  
 #usage inspect.sh filetopreview  
 #inspect function credit : http://www.drbunsen.org/  
 i() {  
      (head -n 5;tail -n 5) < "$1" | column -t   
 }  
 #calls the function  
 i $1  

No comments:

Post a Comment

Datanami, Woe be me