Created
April 22, 2013 02:21
-
-
Save phatblat/5432046 to your computer and use it in GitHub Desktop.
Bash script to extract the repo name out of a URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repo_url=git@github.com:phatblat/dotfiles.git | |
repo=${repo_url##*/} | |
echo ${repo%%.*} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks ! :) Just what I needed 👍