I have the databases name in following format
username_databasename
Now I want to put separate database backups in username directory like
/backups/username/backup
How can I get the usernamae from that string
I also want that if string does not contain underscore (_) then the backup should go to
/backups/others/backup
You can do: