Skip to content

Instantly share code, notes, and snippets.

@phatblat
phatblat / gist:5432046
Created April 22, 2013 02:21
Bash script to extract the repo name out of a URL
#!/bin/bash
repo_url=git@github.com:phatblat/dotfiles.git
repo=${repo_url##*/}
echo ${repo%%.*}