16 lines
		
	
	
		
			284 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			284 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
alias grepphp='grep -n --include=*.php'
 | 
						|
alias grepjs='grep -n --include=*.js'
 | 
						|
 | 
						|
function grept {
 | 
						|
    if [[ -z "$1" ]]; then
 | 
						|
        __func_head "TYPE GREP_ARGS"
 | 
						|
        echo
 | 
						|
    else
 | 
						|
        CMD="grep --color=auto -n --include=*.$1"
 | 
						|
        shift
 | 
						|
        $CMD $@
 | 
						|
    fi
 | 
						|
}
 |