I have a question: how to replace forward slashes with backslashes?
I have string:
App/Models
And I need
App\Models
Thank you very much
I have a question: how to replace forward slashes with backslashes?
I have string:
App/Models
And I need
App\Models
Thank you very much
Try this (in e.g. bash),
string="App/Models"
echo "${string//\//\\}"
or if you don't have it as variable, you can use tr:
printf '%s\n' "App/Models" | tr '/' '\'
$ printf '%s\n' "App/Models" | sed -e 's|/|\\|g'
App\Models