Skip to content

Commit

Permalink
now sorts ssh sessions based on relevance(number of previous connecti…
Browse files Browse the repository at this point in the history
…ons)
  • Loading branch information
gko committed Jan 1, 2017
1 parent 9bb86a3 commit e58430b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ git clone --recursive https://github.com/gko/ssh-connect
source ./ssh-connect/ssh-connect.sh
```

## Like it?

:star: this repo

## License

[MIT](http://opensource.org/licenses/MIT)
Expand Down
2 changes: 1 addition & 1 deletion listbox
Submodule listbox updated 2 files
+38 −0 README.md
+15 −4 listbox.sh
2 changes: 1 addition & 1 deletion ssh-connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source $(dirname "${BASH_SOURCE[0]}")/listbox/listbox.sh

ssh-history() {
cat ~/.bash_history | grep -E "^ssh\s" | sed -e 's/[[:space:]]*$//' | sort -u
cat ~/.bash_history | grep -E "^ssh\s" | sed -e 's/\s*$//' | sort | uniq -c | sort -nr | sed -e "s/^\s*[0-9]*\s//"
}

ssh-connect() {
Expand Down

0 comments on commit e58430b

Please sign in to comment.