Skip to content

Instantly share code, notes, and snippets.

@arcaduf
Created November 5, 2018 11:31
Show Gist options
  • Save arcaduf/4ed3141f9bc3bf8d96c26ec7d4b30fe3 to your computer and use it in GitHub Desktop.
Save arcaduf/4ed3141f9bc3bf8d96c26ec7d4b30fe3 to your computer and use it in GitHub Desktop.
Replace slash with backslash in Bash
string="/pstore/data/pio/Trials/Ride-Rise/RISE/IMG/S16720/72004/CF/"
echo ${string//\//\\}
\pstore\data\pio\Trials\Ride-Rise\RISE\IMG\S16720\72004\CF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment