Guest User

Untitled

a guest
Feb 8th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # Sample DATABASE_URL = dbms://username:password@hostname:port/dbname
  2.  
  3. DB_PROTOCOL=$(echo $DATABASE_URL | cut -d':' -f1)
  4. DB_DETAILS=$(echo $DATABASE_URL | cut -d'/' -f3)
  5. DB_NAME=$(echo $DATABASE_URL | cut -d'/' -f4)
  6. HOST_NAME=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f1)
  7. PORT=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f2)
  8. USER_NAME=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f1)
  9. PASSWORD=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f2)
Add Comment
Please, Sign In to add comment