Guest User

Untitled

a guest
Apr 9th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. user="someUser"
  2. pass="somePass"
  3. uri="http://sometld.org/path/repo.git"
  4.  
  5. proto=$(echo $uri | awk -F"/" '{print $1}')
  6. domain=$(echo $uri | awk -F"/" '{print $3}')
  7. repo_path=$(echo $uri | awk -F"/" '{print $4}')
  8. repo_name=$(echo $uri | awk -F"/" '{print $5}')
  9. echo "$proto//$user:$pass@$domain/$repo_path/$repo_name"
  10. # http://someUser:somePass@sometld.org/path/repo.git
Add Comment
Please, Sign In to add comment