![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| removing pattern which is spread in multiple lines | sabyasm | Shell Programming and Scripting | 2 | 05-13-2008 05:19 AM |
| Removing certain text from multiple filenames | Djaunl | UNIX for Dummies Questions & Answers | 6 | 01-15-2008 05:52 PM |
| removing old files except configuration files and folders | jamcalicut | Shell Programming and Scripting | 1 | 11-09-2007 04:34 PM |
| Please Help. Need Help searching for multiple stings in a file and removing them. | mjs3221 | UNIX for Advanced & Expert Users | 2 | 08-19-2006 06:28 AM |
| Removing user from multiple groups via command line | jquizon62 | SUN Solaris | 1 | 10-28-2004 12:56 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Removing M^ from multiple files
to do this i usually type dos2unix <file> -o <file>
and this will remove the M^ from the end of each file. well i have over 100 files that someone copied that i need. how do i remove the M^. i saw a perl script but i am not familiar with .pl at all really |
|
||||
|
Quote:
That is because "directory" is supposed to be replaced by the directory you want to make the changes in. As a general idea, if you are offered a script that you don't understand what it's doing, don't run it, ask what a part of it is doing. Otherwise people could tell you to run all kinds of rubbish. |
|
||||
|
Just to pass on snippets, here's what I use:
perl -pe 's/\015\012/\n/g' - dos to unix -- just pipe through it perl -pe 's/\n/\015\012/g' - unix to dos -- just pipe through it cat filename |perl -pe 's/\015\012/\n/g' > filename.without.ctrl.m dos2unix works well, but isn't on all systems. I now use this perl. |
| Sponsored Links | ||
|
|