Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function what_is_up {
- nmap 127.0.0.1 -p 8070,8080,8090 | awk '
- BEGIN {
- count=0;
- }
- /^[0-9]+\/tcp/, // {
- ORS="";
- if ($2 == "open") {
- if (count == 0) { print ":"; }
- if (count > 0) { print ","; }
- printf("\033[92m%s\033[00m", substr($1, 1, length($1) - 4));
- count +=1;
- }
- }'
- }
- function what_ip {
- ifconfig en1 inet | awk '/inet/ {printf("\033[92m%s\033[00m", $2); }'
- }
- source /usr/local/etc/bash_completion.d/git-completion.bash
- export PS1='\u@$(what_ip)$(what_is_up)/\W$(__git_ps1 " [\[\033[92m\]%s\[\033[00m\]]") $ '
Add Comment
Please, Sign In to add comment