Remove "^M" out of files created with Windows

Hi,
Im trying to set up "OpenBox" but I dont want to type all the configfiles by hand. But as there is no software linked in OpenBox yet, I only have FireFox installed
Now I was so clever (!) to copy and paste the configs in Windows and sent by mail to my Linux-system. So far, so good.
When I open the files (sh-scripts etc) I have these ugly Windows-$%&!%%! in these files. The files/scripts are quite long so I dont want to remove by hand.
Can u give me a hint how to remove them using vi automatically? If I remember well there was a command for tha... ("Hallo brain, nobody there?")
Would be great if somebody could help.
Thanks for your efforts,
The Pope

ok, I really want to get this accross, because you really don't need a binary for every job.  That's part of the philosophy of Unix, using general purpose binaries together to do specific tasks.
In this case 'cat' and 'sed'
The first part of the command is 'cat windowsConfig |', putting the file with the annoying ^M onto stdin for the next app on the command line.
The next part is 'sed s/^M$//'.  This is the part you aren't understanding.  Type "sed s/" then ctrl-v and then ctrl-m. You will then see "sed s/^M" on the console.  Type the rest with "$//".  The dollar sign means "end-of-line" in Regular Expressions.  This command literally means replace ^M$ with nothing.
Thus the resulting command :
cat windowsConfig | sed "s/^M$//" > linuxConfig
If you don't get it yet, google "regular expressions", and be amazed how much of your life has been wasted not knowing them.

Similar Messages

  • How to delete hyperlink (Remove signature) in a form created with InfoPath

    Hello. 
    We have Sharepoint 2013 Foundation in production. It work with forms created with InfoPath. In these forms, digital signatures are used to approve. The problem is that once you have signed the forms, the user can remove the signature. That's what we want to
    avoid.
    Which file should I edit to remove the hyperlink? I can not find how to do it. Do you know a better option? 
    Greetings.
    MCSA: Windows Server 2008

    Hi,
    According to your post, my understanding is that you want to delete hyperlink (Remove signature) in a form created with InfoPath.
    As far as I know, there is no OOTB way to achieve this. You need to use custom code to prevent removal of digital signatures.
    Please add the OnBeforeChange handler code to the "signatureN" group where the signature is stored, not to the section you are signing.
    In other words (my excample) browse to :
    Tools - Form Options - Digital Signatures - "Enable digital signature for specific data" - Modify/Add
    Note the "Store signatures in the following group" value. It will be a read only value, eg /my:myFields/my:signature3/my:signature4
    Here is a similar thread for your reference:
    http://www.infopathdev.com/forums/p/3661/12829.aspx#12829
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Can't open DNG files created with Mac CS5 downloader in Mac CS4 Photoshop

    I recently installed CS5 on my mac but I kept CS4 installed as well.  I notice that I cannot open DNG files created with CS5 in Photoshop CS4.  Bridge CS4 shows the files only as icons - no image thumbnails.  I am able to open these same files on a Windows version of CS4.  Is there some plugin for my mac CS4 that will enable me to access the DNG files created with CS5?  Is there a way to use my CS5 downloader when converting my raw files from my camera to DNG files that will make them compatiple with PS and Bridge CS4?

    rr3rd wrote:
    Is there a way to use my CS5 downloader when converting my raw files from my camera to DNG files that will make them compatiple with PS and Bridge CS4?
    Well, yes...but you'll need to modify your DNG Converter prefs to allow for that. You''ll need a recent (ideally current DNG Converter 6.4.1 or above) and click on the DNG Converter preferences and select the correct DNG Converter options. Check DNG Converter 6.4.1 (the current version) and click on "Change Preferences" to be sure select Camera Raw 5.4 and later then make sure CS4 is updated to ACR 5.7 (which is the last version of ACR for CS4) However, the changes made to ACR 6.x really should be adopted since IQ for ACR 6.4.x is a lot better...

  • Can't open xls file created by windows excel

    when i try to open a xls file created by windows excel, my numbers (3.2.2) tells me that " 'file name' cannot be opened' please help, thank you!

    ack, this whole thing is frustrating. I can create new .numbers documents, save them as Excel documents, and those resulting .xls documents will open fine. HOWEVER, if I grab an old .xls document from a time machine backup (over a month ago), I cannot open it. Nor can I open an newly saved .xls document saved from the same original .numbers file.
    It would seem that the only thing I can do now is take those old .numbers files and copy/paste the content into a brand new .numbers file. After saving as, the resulting .xls files open fine (with the usual "import warnings", but I'm used to those )

  • Strange that I can save a pdf file created in windows 8.1 to my cloud storage

    Strange that I can save a pdf file created in windows 8.1 to my cloud storage, but then I don't see it when I open my account. What is strange is that when I try again to save the file, system ask me to change the file name or over write current file. But file not present in my drive. Any help would be much appreciated

    Hi jeffjn,
    Please log out of your account, clear the cache, and then log back in. If that doesn't work, please log in using a different web browser. (See System requirements | Acrobat.com for a list of supported web browsers.)
    Please let us know how it goes.
    Best,
    Sara

  • DNG files created with LR4 do not show thumbnails

    Hi, 
    When using LR3 to create DNG files from my RAW files, those files would show me thumbnails of my image in Windows Explorer.  I am running Windows/7 (64) and have installed a CODEC from "Fast Picture Viewer" that allows thumbnails from RAW & DNG files to be shown.   It seems, however, that the thumbnails do not show for DNG's created with LR4.
    To Remedy this I uninstalled the CODEC.  Downloaded the most recent version and installed it but this did not fix the problem.
    I then went to the user forum for the CODEC product and searched for my problem.  I found a thread who's solution is to turn off "Embed Fast Load Data" when exporting to DNG and it fixes the problem.  I tried this and indeed it did fix it.  The responder went on to say ".....When this option is enabled the files created are no longer DNGs (just an undocumented private format of Adobe that no one else can read to this date)".   This statement surprised me as it is counter to what I understand Adobe created DNG to be.  Can I get some input on this comment as if true it is very troubling.
    My second question is that I see where to turn off the "Embed Fast Load Data" in the LR Export module, but where do I do the same thing in the Import module when I'm selecting import mode "Copy to DNG"?
    And, my thrid question is this.  If indeed the DNG files created by LR4 are proper DNG files and this CODEC is just flawed in some way, does anyone have a better way to allow image thumbnails to be shown in Windows Explorer?
    Thanks -- Dan

    Hi David,
    You testing does not coincide with mine.  I have consistently kept "Use
    lossy compression" turned off.  With lossy turned off, it seems that using
    Fast Data Load prevents the thumbnails from displaying whereas turning off
    "Fast Data Load" allows the thumbnail to be shown.
    Below is comment from Adobe confirming that they have yet to release the
    spec containing "Fast Data Load".
    From: Ian Lyons [email protected]
    Sent: Tuesday, June 05, 2012 12:29 AM
    To: Califdan
    Subject: DNG files created with LR4 do not show
    thumbnails
    Re: DNG files created with LR4 do not show thumbnails
    created by Ian Lyons in Photoshop Lightroom - View the full discussion

  • After Effects CS6 connot open files created with CC 12.1 Mac version

    After Effects CS6 connot open files created with CC 12.1 Mac version. Is there an update?
    I am running Windows 7 Pro and Adobe CS6 Suite with all updates

    You are never able to open projects from one version of After Effects in an earlier version. This has always been the case.
    You can use the command File > Save As > Save A Copy As CS6 to save a version of the project from After Effects CC (12) that can be opened in After Effects CS6 (11).

  • Would a MacBook Air run PowerPoint files created in Windows without any problems?

    I am considering buying a MacBoo9k Air. However, I need to be sure that it would be able to run, edit, save without problems files created in PowerPoint with a Windows-based PC. Do I need a special software for this?

    Yes, Powerpoint Mac should be identical to Powerpoint PC. Powerpoint on the Mac will open Powerpoint files created with the Windows version.
    In practice, that isn't entirely the case, as there are different versions of both Powerpoint Mac and PC.
    You need to be running the latest versions of both on the Mac and PC.
    Even then you may have some minor formatting issues. Whether you consider that a problem, is up to you.
    I only way to ensure that the Powerpoint files edited on the Mac display correctly on your Windows PC is to run the Windows version of Powerpoint either in Bootcamp or Parallels/Fusion on your MacBookAir.
    It's not as seemless as it should be, however, Bootcamp or virtualization ensures you can run the Windows version of Powerpoint if you need to.

  • Captivate File Created with Trial Will Not Open in Paid for Captivate

    I have a file created by Trial version of captivate. It was created in a different computer. Now, I have to make some modification in the file. However, when I tried to open it with Captivate 5.5, I got the error shown below. I am not able to use the popular solution provided in this link Click here to view   because the file was not created in my computer. I believe that there is a lock on the file since it was created with Trial version of captivate. Is it possible that I send the file to a representative, and they look into it?

    Was the file created with the same version? You talk about 'trial', but the only trial version available at this moment is Captivate 8. You were never able to open a Captivate project in a previous version, that explains why you cannot open it in 5.5.

  • File created with Trial version cannot be opened by Captivate 5.5 (Ensure that the file isn't open, the file isn't damaged....etc.)

    Hi,
    I have a file created by Trial version of captivate. It was created in a different computer. Now, I have to make some modification in the file. However, when I tried to open it with Captivate 5.5, I got the error shown below. I am not able to use the popular solution provided in this link Click here to view   because the file was not created in my computer. I believe that there is a lock on the file since it was created with Trial version of captivate. Is it possible that I send the file to a representative, and they look into it?

    Was the file created with the same version? You talk about 'trial', but the only trial version available at this moment is Captivate 8. You were never able to open a Captivate project in a previous version, that explains why you cannot open it in 5.5.

  • Why won't Lion file share with windows 7?

    Why won't Lion file share with windows 7? Is there going to be a fix?

    Verysafety shareing file...

  • Video from .ts files (created with Arcsoft Showbiz) played in accelerated.

    Hello everybody, can you explain me why in PREMIERE PRO CS6, the video from .ts files (created with Arcsoft Showbiz) is played in accelerated while the sound is played normally ?
    If it is normal, an update would be great
    Thank you.

    >imported from vhs (with Hauppage Colossu).
    As far as I know, the best way to digitize vhs tapes is with a http://www.grassvalley.com/products/converters product
    Model 55 is one way from tape to computer, model 110 allows exporting back to tape
    Files are DV AVI which edit very well in all versions of Premiere

  • Importing movie files created with SONY HDR-TG5

    Having trouble importing movie files created with this camera. Have had success importing direct from the camera using streamclip, but struggling with old files imported from our PC. These files have these two extensions; .modd and .m2ts

    Eric:
    Thank you. MPEG Slipstream worked great.
    Do you know if there is software available that would let me see what is in/copy the files in the Sony folder so that I might be able to copy the disk directly instead of having to copy the files off of it with Handbrake? Would having the QT add-on for the MPEG-2 playback component be helpful?
    Thanks again
    Tim

  • Can I hand off a Premiere Pro CC file created in Windows to another editor who works in Premier Pro CC Mac OS?

    Can I hand off a Premiere Pro CC file created in Windows to another editor who works in Premier Pro CC Mac OS?

    Thanks Miles4Ever!
    When you say converted, do you mean you got a dialogue box after double clicking saying the file needed to be converted?  Or some other kind of procedure.  thanks again.

  • Problems opening .pdf files created in Windows in MAC

    My clients that are using Macs are having problems opening password protected PDFs that I created in Windows. Any suggestions?

    Are your clients using Adobe Reader on Mac, or the built-in Mac OS Preview?  Preview does NOT support the full PDF standard :(.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 26 Sep 2011 15:04:18 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problems opening .pdf files created in Windows in MAC
    Problems opening .pdf files created in Windows in MAC
    created by Hollcy<http://forums.adobe.com/people/Hollcy> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/3939175#3939175

Maybe you are looking for