Perl command to Remove Extraneous ^M character

In preparing a fortran program with word and saving it in a text format -extraneous end-of-
line characters appears ^M when displaying the file on unix with more command.
What perl command will remove these characters ?
What is the recommended applicationfor preparing a fortran program to be compiled by g77? On linux machines I use a full screen emacs editor with pull down menus. This does not exist on the Mac.

Use either
perl -pi -e 's|
|
|g' file.f
or
perl -pi -e 's|
||g' file.f
depending on whether you are dealing with Classic-Mac or Windoze line endings.
g77 is obsolete.
gfortran is the current gnu fortran compiler. Intel also makes a proprietary fortran compiler.
more info
You can write code in any number of text editors. more info You should set them to use unix line endings.
If you want to stick with emacs, you can install the same X11-based xemacs you have on linux, or you might prefer to try a native interface: aqua-emacs.

Similar Messages

  • [svn:fx-trunk] 13358: Manually removing extraneous whitespace from the start of the en_US playerglobal rb DITA XML files to unblock the build .

    Revision: 13358
    Revision: 13358
    Author:   [email protected]
    Date:     2010-01-07 17:10:34 -0800 (Thu, 07 Jan 2010)
    Log Message:
    Manually removing extraneous whitespace from the start of the en_US playerglobal rb DITA XML files to unblock the build. We need to work with the doc team to make sure future drops do not contain this whitespace.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-24896 - playerglobal_rb.swc has dita content that is not encoded correctly
    Reviewer: For Jim, Jeff
    Tests run: ant other.locales
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24896
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/__Global__.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/air.net.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/air.update.events.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/air.update.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/authoring.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.accessibility.xm l
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.data.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.desktop.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.display.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.errors.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.events.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.external.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.filesystem.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.filters.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.geom.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.html.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.media.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.net.drm.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.net.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.printing.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.profiler.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.sampler.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.security.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.system.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.text.engine.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.text.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.ui.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.utils.xml
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/en_US/docs/flash.xml.xml

    Thats good news.

  • CSCsm71553 - BGP advertises prefix after network command is removed

    Hello,
    I got a stack of core switches with the following components :
    Switch Ports Model              SW Version            SW Image
         1 52    WS-C3750G-48PS     12.2(52)SE            C3750-IPSERVICES-M
    *    2 52    WS-C3750V2-48PS    12.2(52)SE            C3750-IPSERVICESK9-M
    BGP is configured on the stack in order to exchange routes with our WAN operator.
    I've been told that with some versions of these IOS, BGP keeps on advertising prefix after network command is removed.
    Can you tell me more about it and tell me if my software versions are submitted or not to this bug.
    Thanking you;
    Best regards;
    Pascal

    Hi Amit
    Thanks a lot for your feedback.
    To be noted : I also received an answer from a Cisco engineer writing me the bug was resolved since the 12.2(46)SE version. I will take no risk and prefer taking your answer into account.
    Best regards.
    Pascal

  • Remove unicode control character

    hey, so i've asked this around a few places and recieved no answers, but the arch community seems like a bunch of smart people and i've recently switched over from ubuntu.
    is there a way to remove input methods and unicode control characters from the context (right-click) menu? i've searched and searched, but i've had no luck with this.
    there's a way to remove it in gnome with gconf, but i've tried that, and no luck.
    i'm using openbox, and i think i found something about my gtkrc file along these lines
    gtk-show-input-method-menu =
    gtk-show-unicode-menu =
    both are "gboolean" which i don't know what it is, or if this is even what i want.
    any help would be appreciated, as i never use these menus.

    U+2415, SYMBOL FOR NEGATIVE ACKNOWLEDGE is not a control character. It is a normal symbol character, which is a substitute display character used when the control character U+0015 NEGATIVE ACKNOWLEDGE is to be displayed instead of being interpreted.
    You need to refine your question.
    In general, you can remove any particular character or characters from a string using the SQL functions TRANSLATE or REPLACE. You can use CHR or UNISTR to encode characters that you cannot enter from a keyboard. You can use REGEXP_REPLACE with POSIX character classes to remove broader ranges of characters.
    -- Sergiusz

  • Remove last newline character

    How can I remove the newline character only from the very end
    of a string? (Note there are several newline characters within the
    string). Thanks!

    How long is the string and roughly how many newline
    characters are there? One way, although kinda funky, would be to
    convert the newline-delimited list to an array, and then convert it
    back. See below.

  • I have somehow added a divider to my browser screen. When I open firefox there are 2 screens with seperate scroll bars. I am not using the add on feature that allows screen seperation. I cannot find a command to remove the 2nd screen.

    The Left side of my browser screen has a seperate screen with it's own scroll bar. I can use the curser to pull this screen half way to the right. it has a seperate web page than the main window. I can't find a command to remove it. I did have a yahoo toolbar I thought may have been involved.

    Hi,
    Please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode.] Safe mode disables the installed '''Extensions''', themes ('''Appearance''') and '''Plugins''' in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''.
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]

  • How to remove new line character from query output?

    Hi,
    How to remove new line character from query output?
    have tried select replace(column_name, CHR(10), ' ') from table_name.
    Edited by: GreenHorn on Sep 11, 2008 12:53 AM

    Please consider, that windows uses a sequence of chr13||chr(10) Unix uses only one character chr(10).
    The new line character(s) may be OS-dependent.
    You could consider both with:
    replace(replace(column_name, CHR(13)||CHR(10), ' '),CHR(10),' ')
    Hartmut
    Edited by: hartmutm on 11.09.2008 01:32

  • Terminal command to remove folders

    Hi, I was wondering what the terminal command to remove entire folders was if anyone can tell me thanks.

    rm -rf path/to/folder

  • Command-Line Remove Open Directory Server

    What is the terminal command to remove an Open Directory server?

    On LDAP server open the Terminal and run this:
    +sudo slapconfig -destroyldapserver+
    *man slapconfig* will give you more interesting options

  • Command to remove the preempt option

    Is there a single command to remove the preempt option in the configuration, or other way to remove it without service interruption?
    ip virtual-router 1 priority 110 preempt
    I don't want to use the 'no' form to remove the whole command and add it back, which should cause service interruption.
    Many thanks.

    How about 'ip virtual-router 1 priority 110' command?
    When I checked the command with below basic config,
    'ip virtual-router' configuration is overwritten.
    I don't know the impact of production traffic since I don't send any traffic.
    So, I suggest to configure it after office hours.
    CSS11503-A(config-circuit-ip[VLAN774-192.168.74.200])# show run cir
    !************************** CIRCUIT **************************
    circuit VLAN774
      ip address 192.168.74.200 255.255.255.0
        ip virtual-router 1 priority 110 preempt  <<==
    CSS11503-A(config-circuit-ip[VLAN774-192.168.74.200])# ip virtual-router 1 priority 110  <<==
    CSS11503-A(config-circuit-ip[VLAN774-192.168.74.200])# show run cir
    !************************** CIRCUIT **************************
    circuit VLAN774
      ip address 192.168.74.200 255.255.255.0
        ip virtual-router 1 priority 110  <<==
    Regards,
    Yuji

  • Perl command not working throgh database.

    Hello,
    I am using perl command to convert unix format to dos format.
    I have written perl command in shell script and call shell script though database.
    Suddenly perl command is not working though database call.
    I can convert file using perl command through command promt.
    What could be the issue?

    user10540254 wrote:
    What could be the issue?Environment. When making that o/s call to run the perl script from inside Oracle, an external o/s process is created. This process executes the perl script. This process needs a valid environment (e.g PATH variable and others) in order to find the Perl run-time system, the required commands and libraries and so on.
    If the process does not have a valid environment, it will fail. You can test that manually by logging on to the server, and running the command unset PATH before executing the Perl script.
    One approach to this, is not to call something like the perl script directly. Instead create a shell wrapper script. In this script set a valid environment and then have it execute the perl script with the required command line parameters. Typically a shell script can always be executed (despite minimal environment settings), as long as you fully qualify the location (path) of the script.

  • How to find and remove any special character in filename?

    I have a files in various Windows Servers 2003 with a special character at his names, who are causing problem with backup software, i don´t know what character is because in explorer they are not shown and in command line they are shown only as interrogation
    mark and for this, i don´t know how i will find and remove then.
    Thanks.

    Hi,
    I agree with Dave. We can try using
    chkdsk utility to check the file system and file system metadata of a volume for logical and physical errors.
    Regarding
    chkdsk, the following article can be referred to for more information.
    Chkdsk
    http://technet.microsoft.com/en-us/library/cc730714.aspx
    Best regards,
    Frank Shen

  • How to remove the newline character at the start in the attachment ?

    Hi All,
    I have been trying to attach a .dat file generated at an external source and send it as an attachment by mail using UTL_SMTP, all things are working but the .dat file which comes attached in mail contains a newline character i.e. chr(10) at the start line and the contents of the file are written from second line onwards. Below is some part of the code which deals with read/write of attachment of mail to be sent.
    Can anyone help me on this, is something to be changed in this code??
    UTL_SMTP.write_data(c,
    'Subject' || ': ' || P_SUBJECT || UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    'MIME-Version: 1.0' || UTL_TCP.crlf || -- Use MIME mail standard
    'Content-Type: multipart/mixed;' || UTL_TCP.crlf ||
    ' boundary="-----SECBOUND"' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 7bit' || UTL_TCP.crlf ||
    UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf || l_text);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c, UTL_TCP.crlf);
    UTL_SMTP.write_data(c,
    '-------SECBOUND' || UTL_TCP.crlf ||
    'Content-Type: text/plain;' || UTL_TCP.crlf ||
    ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
    UTL_TCP.crlf ||
    'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
    'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
    TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
    UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);
    BEGIN
    l_filehandle := UTL_FILE.fopen('c:\temp',
    'FS_Extract.dat',
    'r',
    32767);
    LOOP
    UTL_FILE.GET_LINE(l_filehandle, l_buffer, 32767);
    UTL_SMTP.write_data(c, l_buffer || UTL_TCP.crlf);
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    UTL_FILE.fclose(l_filehandle);
    UTL_SMTP.write_data(c, '-------SECBOUND--');
    UTL_SMTP.close_data(c);
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    BEGIN
    UTL_SMTP.quit(c);
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error THEN
    NULL;
    -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The quit call will raise an
    -- exception that we can ignore.
    END;
    RAISE_APPLICATION_ERROR(-20000,
    'Failed to send mail due to the following error: ' ||
    SQLERRM);
    END;
    Thanks,
    -Amol

    As I recall, a single blank line serves as separator between Mime Header and Mime Body.
    This code..
    UTL_SMTP.write_data(c,
      '-------SECBOUND' || UTL_TCP.crlf ||
      'Content-Type: text/plain;' || UTL_TCP.crlf ||
      ' name="/inetpub/wwwroot/Novation_Merge/FS_Extract.dat"' ||
      UTL_TCP.crlf ||
      'Content-Transfer_Encoding: 8bit' || UTL_TCP.crlf ||
      'Content-Disposition: attachment;' ||UTL_TCP.crlf || ' filename="' || p_description ||
      TO_CHAR(SYSDATE, 'DD-MON-YYYY') || '.dat"' ||
      UTL_TCP.crlf || UTL_TCP.crlf ||UTL_TCP.crlf);  ..generates 2 blank lines after the Mime Header.
    Remove the last CRLF and see if that does the trick.

  • Batch file gives error "is not recognized as internal command.." after first character

    For every batch file I create, I receive the same error displaying after only running the first character in the file: ' d' is not recognized as an internal or external command, operable command or batch file.
    This occurs whether I run 'dir' cd '../..' or java.exe
    I've confirmed the path environment variable has the correct paths, cmd.exe is assigned to comspec, I'm running as admin, etc. What have I not setup correctly to run batch files. I can run these same commands directly at the command line.
    I'm running the latest version of 8.1, on Toshiba Satellite C855

    We do not have access to your computer, we cannot read your mind, and we cannot see your screen.
    Please copy and paste the exact command you are using and also copy and paste the
    exact error message.
    -- Bill Stewart [Bill_Stewart]

  • Remove non ascii character

    i need a SQL or Procedure that will search non ascii character  in data and update the data by removing it
    Suppose there is table TABLE1 with Column NAME
    it contain number of row and few has non ascii character eg 'CharacterÄr'
    My sql or procedure should be able to search  'CharacterÄr' and update the row with 'Character'
    i.e. removing the non ascii character 'Ä' from the data

    Hi,
    Okay, in that case:
    SELECT str
    ,      REGEXP_REPLACE ( str
                          , '[^[:cntrl:] -~]'
                          )   AS new_str
    FROM    table_x
    or, to actually change the rows that contain the bad characters:
    UPDATE  table_x
    SET     str = REGEXP_REPLACE ( str
                                 , '[^[:cntrl:] -~]'
    WHERE   REGEXP_LIKE ( str
                        , '[^[:cntrl:] -~]'

Maybe you are looking for

  • Script to calculate space usage at the database level.

    Hi, Can someone provide me a script to calculate the Total space, Used space and Free space for all tablespaces within a database?? I have been trying to use the below combinations in my queries and both provide different results.. 1) dba_data_files

  • OWB ORA-2000 unable to analyze table

    During execution I received the error above. In the mapping, I have two targets in two different schema's. I receive the error on the target that is in a different schema than the mapping. Is there a workaround? We do not have rights to grant analyze

  • Aperture pictures disappear

    Hello, I'm using pictures from Aperture to put onto a photo page in iWeb. I made a couple of adjustments to a picture and suddenly that picture doesn't appear in the iWeb photo listings. Perhaps it's because a new variation has been created. However,

  • Documaker- Using Lookup with xml

    I am not able to use the lookup Rule to read the data from xml/table file. Requirement - I want to read xml for company number, after that I want to go to table file and append the company number to the field name and fetch the data from table and di

  • ODS QM status

    I was trying to perform initialization on ODS. Even though the ODS is configured to set the QM status green automatically, the load gave me an error saying QM STATUS MUST BE SET TO GREEN BEFORE IT IS ACTIVATED. What can I do. Thanks in advance for th