How to remove ^M when open with vi

Hi All,
O.S is SUN 5.10
below is .sh file which i need to run but when i opened it with vi it shows ^M, so how to remove this , please suggest.
ORACLE_SID=test^M
. oraenv^M
^M
sqlplus /nolog << EOF^M
conn / as sysdba^M
^M
set echo on^M
set heading off^M
set timing on^M
set serveroutput on^M
set timing on^M
^M
spool FUL_.SQL.OUT^M
^M
ALTER SESSION ENABLE RESUMABLE;^M
ALTER SESSION SET RESUMABLE_TIMEOUT = 10800;^M
alter session set current_schema=partd;^M
^M
@FUL_.SQL^M
ALTER SESSION DISABLE RESUMABLE;^M
spool off^M
EOF^M

[email protected] wrote:
Hi All,
O.S is SUN 5.10
below is .sh file which i need to run but when i opened it with vi it shows ^M, so how to remove this , please suggest.
ORACLE_SID=test^M
. oraenv^M
^M
sqlplus /nolog << EOF^M
conn / as sysdba^M
^M
set echo on^M
set heading off^M
set timing on^M
set serveroutput on^M
set timing on^M
^M
spool FUL_.SQL.OUT^M
^M
ALTER SESSION ENABLE RESUMABLE;^M
ALTER SESSION SET RESUMABLE_TIMEOUT = 10800;^M
alter session set current_schema=partd;^M
^M
@FUL_.SQL^M
ALTER SESSION DISABLE RESUMABLE;^M
spool off^M
EOF^MWell, this isn't an oracle question ... but ...
What you are seeing is the result of moving a text file from a dos (windows) platform to a nix platform without proper translation.  In dos, two characters are used to indicate end-of-line.  they are the control characters for Carraige Return and Line Feed (x'13' and x'10').  In nix, only one character. I can't remember if it is the x'13' or the x'10'. Normally, when a file is copied from one platform to another, the copy utility will recognize this and make the proper modification to the file. However, if you ftp the file in binary mode, no translation occurs. Of course, you can ftp in text (ascii) mode only if it is a text file to begin with, so you can't do this with a zip file.
As already given, there are ways to use vi substitution commands to fix it after the fact. You can also use the utility 'dos2unix' to fix the file after it has landed on the *nix platform. (the actual name of the file may be a variant on the theme of 'dos2unix'.  You may have to google a bit to find it on your OS).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to remove application from Open With?

    Hi,
    I added by accident a wrong application to a file type in Finder. Now I would like to remove this entry from the files Open With list. How could this be done?
    Thanks and best regards
    Ralph

    Is it just that specific document you want to open with another application or is it all documents of the same format?
    #1 Hold down Ctrl key and choose Open with. Choose the application you want to open the document with. IF you want to always open this one document with another app then the pre-chosen one hold down both the CTRl and the Option key and choose application.
    #2 When you want a certain format of documents to open with another application, let us say all .rtf should open with Pages instead of Textedit, select one rtf document and use Command (apple) key and I to get the information window for this document. Somewhere in the middle you can choose with which app. to open this document with and right beneath there is another button that gives you the opportunity to open all document of the same format with the same application.
    Pardon my Swenglish, but I hope you are helped by this!

  • How to remove programs from "open with".

    Recently I installed VM Fusion on my new MBP with SnowLeopard. The annoying issue is that when I right click on a file from SL and select "open with" I get a long list with windows programs that I don't intend to use. Is there a way to remove those programs when I select "open with". Thank you
    Juan

    Juan2009 wrote:
    Recently I installed VM Fusion on my new MBP with SnowLeopard. The annoying issue is that when I right click on a file from SL and select "open with" I get a long list with windows programs that I don't intend to use. Is there a way to remove those programs when I select "open with".
    no, there isn't. this list is generated by the launch services database and you can't control it manually.
    Juan
    Message was edited by: V.K.

  • How do I remove an addon (Open with Phoshop)?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/921974]]</blockquote>
    I know how to remove addons, but 'Open with Photoshop' is not removing itself:
    I installed version 1.2 of 'Open with Photoshop', then i updated firefox, but the addon didn't work. There have been many updates for both firefox and 'Open with Photoshop' since then, but I can't upgrade or remove the addon to install the latest version and use it. how should i do this?
    I have ended up with version 1.2 that wont remove, and version 2.2 floating between the list of installed and uninst6alled addons in the addons manager. Help please?!!!
    It won't uninstall on nightly 13 (04/03/12) and firefox 10.0.2

    See:
    *http://kb.mozillazine.org/Uninstalling_add-ons
    *http://kb.mozillazine.org/Uninstalling_toolbars

  • How to edit a Finder "Open With" entry

    How do I edit an "Open With" entry on the context menu in Finder? I have an application which updated recently and has added a rather long version number to the application name in the "Open With" entry for the app. I have run a command line which was given to me in these forums to update file-type associations and remove old apps from the list but the version number on this app seems to be resisting efforts to be cleaned up. I am guessing there is something in a PList somewhere but I don't know where.
    Any help would be appreciated.

    Use an encrypted disk image or a third-party method. Placing the password in the keychain will automatically unlock the image when your Mac OS X account is active.
    (53277)

  • I edit and rotate photos using MS Photo Editor. when open with Apple TV- photos still have 90 deg rotation. Why ?

    I edit and rotate photos using MS Photo Editor.
    When open with Apple TV- photos still have 90 deg rotation. Why ?

    Does this have anything to do with iPhoto for the Mac? If so please descrive what and exaclty wha tryou are doing
    LN

  • When I click for a new tab, how can I make it open with google as opposed to it being blank?

    The new tab always opens (untitled) with no www address. I would prefer it to open with google but cant find this option.

    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • How to make navigation tools open with every document?

    Hi -
    I'm using Acrobat 8 Professional.
    Every time I open a document there are no tools at all showing.  The window shows the document and the title bar.  But I'd like to have more than that.
    I finally figured out using cmd-F to get some basic navigation tools (search, page number, I-beam, hand, etc).
    I would like this assortment of tools to open with every and any document I open.
    How do I accomplish this??
    TIA your input.
    JL

    With Voice Over, you highlight whatever you are trying to select and then double tap anywhere on the screen to select.
    So for your password of 1234 you have to
    "Highlight 1, then double tap the screen, Highlight 2, the double tap the screen,... etc."
    In order to remove you have 2 options:
    Option# 1 – Turn off Voice Over
    Go to setting by, highlight "SETTING
    Double tap screen to go into settings
    Use 3 fingers to (swipe) scroll of down and highlight "GENERAL"
    Double tap screen to go into general
    Use 3 fingers to (swipe) scroll of down and then highlight “ACCESSIBILITY”
    Double tap screen to go into accessibility
    Once you are in make sure that EVERYTHING in that section are shown as “OFF”
    Option #2 - Reset your Phone
    Go to setting by, highlight "SETTING
    Double tap screen to go into settings
    Use 3 fingers to (swipe) scroll of down and highlight "GENERAL"
    Double tap screen to go into general
    Use 3 fingers to (swipe) scroll of down and then highlight “RESET”
    Double tap screen to go into reset
    Select “Reset all setting” and continue to follow the instruction
    (When you reset, all of your data and music WILL NOT erase. So don’t worry about that)
    Hope this helps.
    - Hugo

  • Remove applications from 'Open With' dialog

    I have searched seemingly everywhere for an answer to this question. When I right click on an html file (or really any other file) and to go the 'open with' dialog there is a huge laundry list of applications listed. For the html files there are DivX converters, Big Bang games, etc.
    How can I remove all of the applications that I know can not open an html file and others that I would never use to open those files either? I like the ability to easily open the file with different browsers but really dislike scrolling through 30 different applications to find them.
    I have deleted the "com.apple.LaunchServices" file and rebooted.
    I have run "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServ ices.framework/Support/lsregister -kill -r -domain local -domain system -domain user" and rebooted.
    Neither of these solutions are helping the problem at all. I even tried some Onyx program. Is there a way to "trim the fat" from that window?

    The command you ran "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServ ices.framework/Support/lsregister -kill -r -domain local -domain system -domain user" is for 10.4, it is not the correct command to rebuild LaunchServices in 10.5.
    Launch /Utilities/Terminal and copy & paste this at the command line to rebuild LaunchServices:
    Code:
    <pre class="alt2" style="margin:0px; padding:3px; border:1px inset; width:640px; height:34px; overflow:auto">/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user</pre>
    Then press return. Wait until terminal returns to the command line. Quit Terminal. After that, log out and back in or restart. That should solve it. Let us know
    -mj

  • How to stop preview when opening Excel?

    Irritating problem that I can't make go away:  I am using a MacBook Pro assigned to my by my employer.   I use Excel every day and every day, when I click on an Excel file icon "preview" opens the file!   I hate that.  I want Excel to open the file.  I have to close everything click on the Excel icon and then open the file. (1) why is this happening? Why can't I simply double click on an Excel icon and get Excel to open the file?   (2) how to I shut off this "feature" or prevent this from happening in the future?  Thank you.

    Highlight one of toy Exel files, click command I, it will bring up the window you need, near the bottom you can select open with (Exel in this case) and below click all. Hope this helps.

  • Is there a way to remove items from "Open With" list?

    I have an interesting dilemma that I have not yet found an answer to in all of my internet/discussion forum searches.  Maybe I'm asking the wrong questions or searching in the wrong places, but I've given up and now have to post the question in hopes there's an answer out there.
    My issue is that whenever I want to use the "Open With" feature for an image/jpeg file, the list of choices is massive! Looking at it now, it lists over 30 applications, but at most I would only ever want to open this type of file in one of maybe four applications.
    Starting off, I used to have Parallels on my computer.  Have since purchased VMWare Fusion 4 and now use that as my virtual machine to run Windows for some of my design work.  As far as I know, I had removed ALL of Parallels from my computer when I uninstalled the app.  I followed all of the instructions in the uninstall process, but there seems to be something left behind.
    It may seem that mentioning that wouldn't have anything to do with the "Open With" function, but here is a screen shot to show what happens whenever I right-click an image file:
    http://www.virtuosocreative.com/apple/openwith1.jpg
    Most of the time, if I right click the image, it'd be to open in Photoshop or Set as Desktop.  On occasion I have had to open a jpeg file in Illustrator, but that's it.
    For some reason, there are still Parallels applications showing on the "Open With" list, even though it was uninstalled and removed from my computer.  But like I said earlier, it looks like I missed something. 
    In addition, although I am not logged into Windows or have Fusion running in the background, the "Open With" list includes all of the suggested Windows apps as well.  why???
    As much as I appreciate there being such an abundance of options to choose from, this gets extremely annoying when using the feature and I wanted to see if there was any way to modify this list. 
    More than anything, I really want to get rid of all the Parallels extras that are left on my system.  But also, I wanted to see if there was a setting to tweak so that whenever I click on "Open With" on my Mac, it'll only list applications that are my Mac applications and nothing through Fusion or Parallels or anything else.  And to take it a step further, it'd be nice to shorten the list to only applications I would personally use for opening a jpeg file. (i.e. Preview (default), Photoshop, Illustrator, Safari).
    My system is a 2010 iMac i5 2.8GHz/8GB RAM. Lion OS X 10.7.3
    Thanks!

    The Open With menu is built by LaunchServices which collects the information from each app as to what it says it can open. VMWare appears to be registering every app to open jpegs.
    You might try rebuilding the LaunchServices database. I believe this command still works in Lion. Or, you could use a utility like OnyX to call it:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

  • How can I shorten the "Open With" menu?

    Hi -
    When I Control-Click on a file, say  one with an HTML extension, and move down to "Open with" I see a list of about 24 apps - only 4 of which are of interest to me for opening this HTML file.  If I right-click an XML file - the apps I'm looking for are either Dreamweaver or BBEdit - and they are way down the list of candidates.
    PSD files give me the same unweildy results.  (I've got old versions of Photoshop, Flash, Dashcode, Quicktime, Illustrator and many more on that contextual list - all apps irrelevant for my work on PSD).
    I tried using "Get Info" on a PSD, selected the latest Photoshop from the list of "Open with:" and clicked "Change All..." but that didn't narrow down the list very much at all - not even on that one particular file.  I still have TextWrangler, Quicktime Player 7, Dashcode, ColorSync Utility, 3 old versions of Photoshop, 3 old versions of Illustrator to name just a few apps that I wouldn't pick.
    I found out the hard way that I cannot discard old versions of Adobe applications.  The new ones will not work without their ancestors on the same drive.
    Its not just Adobe apps anyway.  After all - Textwrangler to open a PSD???  How was THAT association made?
    Is there a way to narrow the "Open With" contextual menu list?
    TIA your experise.
    J2

    I'm sure this is stored in some .plist file somewhere, but this is really more a generic Mac question, so asking it on a Mac forum is more likely to yield any answers...
    Mylenium

  • Remove Applications from "Open With..." List

    Ever since I installed Adobe Creative Suite, there have been countless applications available in the Open With... list for image file types (JPEGs, PNGs, etc.).
    How do I remove applications from that list for a given file type?
    Thanks!

    There are a whole bunch of mostly useless little droplets that are installed by Photoshop and ImageReady. You can either toss them all, toss all but the one or two you might use, or just zip them and then if you ever want one unzip, take what you want and rezip the others (I kept Make Sepia Tone.exe and zipped all the others, and put a text file with a list of them all in the parent folder). Here's the location:
    "/Applications/Adobe Photoshop CS/Samples/Droplets"
    There is one folder full of ImageReady ones, and another folder of the Photoshop ones. If you trash them you can also get them back from the install disk. After you zip or trash them restart the computer and your Open with list will be back to normal.
    Francine
    Francine
    Schwieder

  • Removing Items Finder Open With Menu

    I'm looking for a way to delete items from the Open With menu in Finder/File/Open With. On my PowerBook there are over fifty items in this menu when selecting a JPEG file.
    Maybe there is away.
    I'm using a Panther drive 10.3.9
    Photoscene

    Photoscene-
    I'm not sure this addresses your exact situation or not, but the following link:
    http://www.macosxhints.com/article.php?story=20031215144430486#comments
    suggests a method for removing items from the "open with" menu that shouldn't be there.
    I have NOT tried the above, so use the usual cautions (backup beforehand, etc.).
    Good luck,
    Alan
    cube   Mac OS X (10.3.9)  

  • How Do I Edit My 'Open With' Contextual Menu?

    When I right click on an image file and select Open With I get a long list of options. Many of them are .exe files and look like actions (Make GIF 64 colors.exe for example).
    How can I edit this list? Some information I found mentioned editing the info.plist file in Photoshop, so I'm sure it's a PS issue.
    Thanks
    Nicholas
    [Photoshop CS4 Extended - Master Collection, MacBook Pro, OS X (10.6.1), Ikea Desk, Takamine Acoustic ]

    Exactly - that's what I thought. Most of those seemed to have disappeared since I nervously uninstalled CS2 (I upgraded from 2 to 4), although I've heard that things can creep back as you use the apps again. I also renamed the plist file.
    However it would be nice to be able to edit what appears there.  I'll give that link a shot - thanks for that.

Maybe you are looking for