Replace all forward slashes with backward slashes

echo '/usr/bin/' | sed 's|\/|\\|g'
Use -i option to edit directly a file: sed -i 's|\/|\\|g' file
Sample Output
\usr\bin\

2
By: bugmenot
2021-07-15 20:09:34

What Others Think

I was very encouraged to find this site. The reason being that this is such an informative post. Thanks for sharing! cabinet maker installer
janejane · 8 weeks and 2 days ago
A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. My Balance Now
Luis784 · 8 weeks and 1 day ago
Good News received from the ( COC MOD and GBWhatsapp ) ... This are the only sites that offers us all the latest updated WhatsApp Alternatives.. We can use this WhatsApp on our phone for our primary and secondary WhatsApp numbers...I thought it will be useful for us..That's why I shared it with all of us...Thank you
peterpong493 · 8 weeks and 1 day ago
I have read your article, it is very meticulous and detailed, the content is also very unique, thank you for sharing this article. [url=https://theimpossible-quizbest.com]the impossible quiz[/url]
candymika · 8 weeks ago
This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. https://potterswheelmedia.com/search-engine-optimization/
aadityaagarwal · 8 weeks ago
This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. https://potterswheelmedia.com/search-engine-optimization/
aadityaagarwal · 8 weeks ago
A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. https://www.liteblue.app/
Cooper521 · 8 weeks ago
This is a fantastic blog post. Your blog post has been quite helpful to us. Following your visit to your article, you will discover a variety of options. I knew exactly what I was looking for. Thank you for such an informative article; please keep it up. https://amongusgame.io https://run3.onl
kanejoyce · 7 weeks and 3 days ago
Ok, thanks for the information and have a good day! mobdro
vikrampaul93 · 6 weeks and 6 days ago
?? ? ????????, ?? ?????? ????????? ??????????????? ???????????, ??? ??????? ???? ??????? ? ?????? Online, ? ??????????? ????? ?????????? ?????????? ??? ????????? ??????????. ?? ???????, ??? ????????? ?????????? ??????? ????????? ??????-???? ????'????? ???????. ??????? ?????????? ?????????? ??????? ??, ?? ???????? ? ??????? ????????. ??? ?? ? ??? ? ??? ????? ?? ??????? ????????? ?????? ???????. ???? ????, ??????? ??????????? ????????? ?????????? ?????????? ?? ??????? ???????? ?????????? ?????? ? ???? ???????, ???? ?? ??????????? ?????? ??? ???????. ?????? ???????, ?? ?? ?????? ?????? ? ????? ???????. ??? ?? ???? ??? ????????? ???????? ?????, ?? ?? ?? ?????? ????????? ????-??? ???????? ? ????? ???????. https://www.epochtimes.com.ua/ru/poleznye-sovety/gde-luchshe-brat-kredit-135925
MitchellGibson · 6 weeks and 4 days ago
A regular expression is used to replace all the forward slashes. As the forward slash (/) is special character in regular expressions, it has to be escaped with a backward slash (\). Also, to replace all the forward slashes on the string, the global modifier (g) is used. My Balance Now
Gravely51 · 6 weeks and 1 day ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
It has never been easy to buy ammo online. Especially the CCI Primers that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... http://AlphaBridge-gunshop.com Email... alphabridgegunshop@gmail.com Whatsapp....+17192859060alliant powder load dataHodgdon H322 black powder for sale Alliant Red Dot Smokeless href="https://www.alphabridge-gunshop.com/product/winchester-12-ga-2-3-4-inch-9-plt-00-buck-double-x-5-box/ " rel="dofollow">Winchester 12 GAWinchester 209 PrimersWinchester Small RifleCCI Large Rifle PrimersCCI Percussion Caps #11CCI Primers #500.CCI Primers #450CCI #41 PrimersCCI Large Rifle 7.62mmlarge rifle primers
lobe123 · 5 weeks and 4 days ago
The entire look of your website is excellent, let alone the content! Also visit my web page - https://www.newhotsite.com
newhotsite · 4 weeks and 3 days ago
A fantastic blog article. We appreciate your blog article very much. After reading your text, you will discover a plethora of ways. That's precisely what I was looking for. slope game
davidkane · 4 weeks and 1 day ago
Your article content is being very much interested, I am very impressed with your post. I hope to receive more great posts. Official website
Bobby8857 · 2 weeks and 4 days ago
The entire look of your website is excellent, let alone the content! Also visit my web page - seo optimization company
opwellwrite · 2 weeks and 2 days ago
One final component of an excellent startup it support services system is the confluence of movers and shakers. Silicon Valley has millions of tech entrepreneurs and path blazers – some who never made it off the ground, some who lasted a short time, and some who are now running the show.
Weent19 · 1 week and 2 days ago
Thanks for the step by step tutorial. LBrands Aces
Agustin56 · 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: