LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-14-2009, 09:50 AM   #1
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 281

Rep: Reputation: 32
converting Dos link backslash to Unix like backslash


How to write a script for converting Dos link backslash to Unix like backslash ?

$sed 's/\\/\//g' file

Are there any other ways to do so ?
 
Old 05-14-2009, 09:54 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
You have already found a good method. Add the -i option if you want to edit the file in place. Add -i.bck if you want to make a bakcup copy of the original file by adding the extension .bck to the file name.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grep: Trailing backslash fakie_flip Linux - Software 9 12-17-2007 09:17 AM
backslash in vi ashlesha Linux - Newbie 5 02-24-2007 06:27 AM
Script to convert DOS backslash to UNIX forward slash pro_chandan Linux - Software 1 10-24-2006 10:09 AM
Backslash in URL Cynthia Blue Linux - Newbie 17 08-18-2003 07:36 AM
Apache: Need backslash to indicate directory? kipbenson4 Linux - Software 2 08-12-2003 09:13 PM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration