|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
As the title says I want to replace all the '\' found in a file with '/'. I have tried with sed but with no luck so far!
![]() |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
sed 's:\\:/:g' infile |
| The Following User Says Thank You to elixir_sinari For This Useful Post: | ||
hakermania (07-30-2012) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
|
|
#4
|
|||
|
|||
|
One more solutions... Code:
tr '\' '/' <test.txt |
| The Following User Says Thank You to bmk For This Useful Post: | ||
hakermania (07-30-2012) | ||
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB). | manishkomar007 | Shell Programming and Scripting | 7 | 09-02-2011 10:59 PM |
| script to grep a pattern from file compare contents with another file and replace | namitai | Shell Programming and Scripting | 2 | 08-30-2011 01:31 PM |
| Read file and for each line replace two variables, add strings and save output in another file | Andy_ARG | Shell Programming and Scripting | 5 | 03-03-2011 12:25 AM |
| how can search a String in one text file and replace the whole line in another file | kkraja | UNIX for Dummies Questions & Answers | 6 | 08-06-2008 07:23 AM |
| serach and replace file name in the path in a remote xml file | kiranreddy1215 | Shell Programming and Scripting | 1 | 11-12-2007 10:31 AM |
|
|