MS/UNIX/DB question - How to find MS characters in Unix scripts.

Hi. I apologise if this is a bit off-topic.
We have been developing sql scripts on PC's but need to run them from UNIX. We are find Microsoft characters like double spaces followed by a dash convert into little squares and upside down question marks. etc.
I can find them in the database using:
SELECT description_text, dump(description_text)
   FROM descriptions
  WHERE regexp_like( description_text, '[^[:print:][:space:]]');And get things like "Adjustment � Service".
In unix that might appear as "\266" in the middle of a text string. We find them in the db, fix them, and re-deploy.. but this is getting tiresome.
I want to be able to repeatedly scan all sql scripts in Unix, including files in subdirectories. (there are literally hundreds..)
We're running SunOS 5.10. I have tried "grep -r {266}" but the -r option isn't valid with my version of grep... :(
Any suggestions about the easiest/most pragmatic way of doing this?
Thanks in advance. :)
Pete
Edited by: peetmoore on 11-Aug-2009 19:51

I couldn't get the shell script to work, so just kept playing with command line.
The closest I have is:   find . -name "*.sql"  | xargs  grep 'xyz' Or using od: find . -name "*" | xargs | od -c | grep 'xyz' But i'm struggling a bit to identify and filter the specifc characters i'm looking for. They appear differently depending on how they're being viewed. (or not at all.) in some cases 2 spaces following by a dash " -" appeared as an update down question mark in Sql and "\266" in the unix script when viewed in vi. I don't have any current examples so it's hard to see what it looks like in od.

Similar Messages

  • How to find sql statement with Unix process pid

    Hi
    how to find sql statement with Unix process pid
    is there any view to find that.
    please if so let me know
    Thanks in advance

    this is how I am doing this:
    oracle 7352340 7459066 0 07:47:10 - 0:00 oracleJDERED (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 7459066 5386396 2 07:47:10 pts/1 0:01 sqlplus
    select sid,serial# from v$session where process='7459066';
    SID SERIAL#
    2178 6067
    select sql_text
    from
    v$sqlarea a,
    v$session b
    where a.hash_value = b.sql_hash_value
    and b.sid = 2178
    ;

  • HT204266 I forget the answer to the security question, how to find the answer?

    Dear all, I forget the answer to the security question, how to find the answer? Thanks

    1. See my User Tip for some help: Some Solutions for Resetting
        Forgotten Security Questions: Apple Support Communities.
    2. Here are two different but direct methods:
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contacting Apple for
            support and service.
    3. For other queries about Apple ID see Frequently asked questions about Apple ID.
    4. Rescue email address and how to reset Apple ID security questions
    5. For online assistance use Apple - Support - Express Lane

  • How to print Special Characters in Sap-Scripts

    How to print Special Characters in Sap-Scripts
    Thanks,
    Ravi

    Hi
    if u want print special characters we can use hot codes i.e '  '  (single inverted commas). in between these hot codes insert u r special characters.
    write    '    !@#$%^&*( )  '.
    for the above write statement output is
    output is   !@#$%^&*( )

  • Newbie Question: How to find Forms/Reports Server Version

    Hello,
    Is there a way to easily find out what is the patchset installed for the Forms and Reports Server. I know that presently using AS 9i rel1 and Forms 6i, but how do you find out more information on the installed patches on Windows? thanks

    Please see these threads.
    how to find the developer version
    Re: how to find the developer version
    Report Builder version
    Re: Report Builder version
    Form patch set level
    Re: Form patch set level.
    Always search the forum before posting similar questions.
    Thanks,
    Hussein

  • How to Find the file in UNIX?

    Hello Team,
    I Have below list files and i have to find the file with latest date and time
    CHECK_300914_200747_xxaa_account_name_20140930195924.txt
    CHECK_300914_203213_xxaa_account_name_20140930203055.txt
    CHECK_300914_205625_xxaa_account_name_20140930200219.txt
    CHECK_300914_211345_xxaa_account_name_20140930200446.txt
    CHECK_300914_213836_xxaa_account_name_20140930200718.txt
    CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    In a list of files "CHECK_300914_215928_xxaa_account_name_20140930201143.txt" is the latest file i.e. ddmmyy:300914 and hhmmss:215928
    Can you please help me to find the file in UNIX
    Thanks in Advance,

    touch CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    touch CHECK_300914_211345_xxaa_account_name_20140930200446.txt
    touch CHECK_300914_205625_xxaa_account_name_20140930200219.txt
    touch CHECK_300914_203213_xxaa_account_name_20140930203055.txt
    touch CHECK_300914_200747_xxaa_account_name_20140930195924.txt
    ll
    total 0
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:27 CHECK_300914_200747_xxaa_account_name_20140930195924.txt
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:27 CHECK_300914_203213_xxaa_account_name_20140930203055.txt
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:27 CHECK_300914_205625_xxaa_account_name_20140930200219.txt
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:26 CHECK_300914_211345_xxaa_account_name_20140930200446.txt
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:25 CHECK_300914_213836_xxaa_account_name_20140930200718.txt
    -rw-r--r-- 1 oracle oinstall 0 Oct  7 11:25 CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    We are interesting in file with maximal values in "field" 2 and 3 assuming that fields are parts of filename separated with "_". I especially created (the file we are interested in) CHECK_300914_215928_xxaa_account_name_20140930201143.txt file to be the first created/modified file.
    find . -name CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    ./CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    will definitely work. But we should know the file name. As for topicstarter note it is not the case.
    ls -tr . | tail -1
    CHECK_300914_200747_xxaa_account_name_20140930195924.txt
    gave incorrect file.
    ls -l . | cut -d" " -f10 | sed 's/\(^CHECK_\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\(.*\)/\1\4\3\2\5/' | sort -r | head -1 | sed 's/\(^CHECK_\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\(.*\)/\1\4\3\2\5/'
    CHECK_300914_215928_xxaa_account_name_20140930201143.txt
    P.S.
    I much apologize for an error in back filename transformation. Correct is marked in bold red.

  • How to find Special Characters in a single query

    Dear Experts,
    Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
    Thanks.
    e.g.
    A_MIR
    A%SIM
    A*SIM
    A)SIM

    Hi,
    947459 wrote:
    Dear Experts,
    Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
    Thanks.
    e.g.
    A_MIR
    A%SIM
    A*SIM
    A)SIMIt's not clear what you want.
    What are "special characters"? Can you list all of them?
    Do you want to find rows where string_column contains any of the special characters? If so
    SELECT     string_column
    FROM     table_x
    WHERE     string_column     != NVL ( TRANSLATE ( string_column
                                        , 'A(%$*&@,;'/+-'
                                , 'A'
                          , 'A'
    ;I assume 'A' is not a special character.
    You could also use regular expressions, but it will be more efficient if you don't use them unless you really need to.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    You'll get better replies sooner if you always include this information whenever you have a question.

  • How to find request number of SAP Script's Form

    Hi All,
    Can anyone tell me how to find out request number of scipt's form
    Regards
    Shashikant

    Hi,
    Se03->Search for Object in Requesta/Tasks--->Right Click ->Execute->Add a new entry with check box ticked,FORM,& Form name on the right side-->F8  It will display all the requests pertaining the form you have keyed in.
    Regards
    Raju Chitale

  • How to find out the Correct Controlfile script Trace .trc file in /bdump

    Hi Guys
    This is the most childish queries in this forum ..
    I wanna know how to Find out the correct trace file when we Issue alter database backup controlfile to trace at sqlprompt for Creating controlfile script.
    As i find it a bit confusing to go through the same Date & almost same time .trc files out of hundreds of trace file in /bdump directory to find the correct one.
    if we 've to find the Alert log file in /bdump directory $ ls -l al* & we get the alert log file .... if there is any similar way to find out the controlfile script Trace file ?
    Thanks & regards
    MZ

    MZ_AppsDBA wrote:
    Hi Guys
    This is the most childish queries in this forum ..
    I wanna know how to Find out the correct trace file when we Issue alter database backup controlfile to trace at sqlprompt for Creating controlfile script.
    As i find it a bit confusing to go through the same Date & almost same time .trc files out of hundreds of trace file in /bdump directory to find the correct one.
    if we 've to find the Alert log file in /bdump directory $ ls -l al* & we get the alert log file .... if there is any similar way to find out the controlfile script Trace file ?
    Thanks & regards
    MZcreation of the does not happen automatically. What script, and when does it run, do you have that creates the control file trace? Look for files in that time frame. Better, modify that script to specifically name the file .. BACKUP CONTROLFILE TO TRACE AS ....

  • How to find the application type fora Script based on Form name?

    Hi Guys,
                can anybody tell me how to find the Application Type and output type based on Form name and print program name?
    I am having form name as: ZINVENT (INVENT is the actual) and program name as RM07IDRU.How can i find the Appliction ntype and OutType for entering into the NACE tr code.
                    i tried thru TNAPR table but i was not able to find the Entry in the TNAPR with form Name and printprogram name
                   Th Script is about Phsical inventory Documents.
    Thanks,
    Gopi.

    You can use this...
    REPORT  Z_DUMMY_ATG NO STANDARD PAGE HEADING.
    *======================================================================
    * Tablas
    *======================================================================
    TABLES: TTXFP.
    *======================================================================
    * Tablas Internas
    *======================================================================
    DATA: T_TTXFP TYPE STANDARD TABLE OF TTXFP WITH HEADER LINE.
    *======================================================================
    * Selection-Screen
    *======================================================================
    SELECTION-SCREEN BEGIN OF BLOCK SCRIPT WITH FRAME.
    SELECT-OPTIONS:
                  PRINTNAM FOR TTXFP-PRINT_NAME,
                  TDFORM   FOR TTXFP-TDFORM.
    SELECTION-SCREEN END OF BLOCK SCRIPT.
    *======================================================================
    * Start-of-selection
    *======================================================================
    START-OF-SELECTION.
      PERFORM SELECT_DATA.
      PERFORM PRINT_DATA.
    *&      Form  SELECT_DATA
    *       Seleccionamos los datos del reporte.
    FORM SELECT_DATA.
      SELECT TDFORM PRINT_NAME LAST_PROG
      INTO TABLE T_TTXFP
      FROM TTXFP
      WHERE PRINT_NAME IN PRINTNAM
        AND TDFORM IN TDFORM
      ORDER BY TDFORM.
    ENDFORM.                    "SELECT_DATA
    *&      Form  PRINT_DATA
    *       Imprimimos el resultado del reporte.
    FORM PRINT_DATA.
      FORMAT COLOR 3.
      WRITE: 'Programa', 18 'Formulario', 50 'Flag de Ultimo programa'.
      FORMAT COLOR OFF.
      SKIP 1.
      IF NOT T_TTXFP[] IS INITIAL.
      SORT T_TTXFP BY PRINT_NAME.
        LOOP AT T_TTXFP.
          IF T_TTXFP-LAST_PROG EQ 'X'.
          FORMAT COLOR 4.
          WRITE:/ T_TTXFP-PRINT_NAME, 18 T_TTXFP-TDFORM, 60 T_TTXFP-LAST_PROG.
          FORMAT COLOR OFF.
          ELSE.
          WRITE:/ T_TTXFP-PRINT_NAME, 18 T_TTXFP-TDFORM, 60 T_TTXFP-LAST_PROG.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "PRINT_DATA
    Greetings,
    Blag.

  • How to find the Characters in RSKC?

    Hi Experts,
    I would like to know what kind of Characters are there in RSKC? Is there any table for it or some method?
    How to find the contents of RSKC?
    Kindly advice.
    Thanks in advance,
    Kannan Jagadeesan.
    Edited by: Kannan Jagadeesan on Dec 15, 2009 12:56 AM

    Hi Kannan,
    Goto SE11 --> table: RSALLOWEDCHAR
    in this table we can see what are the characters allowed in RSKC.
    Hope this helps u,
    Thanks,
    Sai Chand.S

  • How to find the standard smartform,sap scripts and theur driver programs

    Hi friends,
    can any one tell me how to find the standard smartforms and their driver programs and same for scripts also.
    bye
    sasi

    Hi sasidhar,
    1. Either standard or Y sapscript layouts,
       we can check their standard programs
       in this manner also.
    2. goto se71
       open the layout in DISPLAY mode.
    3.  FORM------> CHECK -
    > TEXTS
    4.  a small window will come.
        click ok (tick button)
    5. Again a new window will come
      which will list out all the DRIVER programs,
      which use this layout.
    regards,
    amit m.

  • Simple question - How to find date

    Hi Experts,
    I have a simple question on date. Suppose today is Jan 4, 2010. I have to find out Jan 1, 2007 using Java code.
    I have used following code. This code will work for 2010 and 2011 properly. However it won't work properly after Feb 28, 2012. Please see "dayInMillis*1096 " portion of code. Here 365365366 = 1096.
    How I can avoid this hard coding. Do we have any simple way to get Jan 1, 2007 even without using following code.
         Calendar calendar = Calendar.getInstance();
         int lastDate = calendar.getActualMaximum(Calendar.DATE);
         int firstDate = calendar.getActualMinimum(Calendar.DATE);
         int todayDate = calendar.get(Calendar.DATE);
         int dayofyear = calendar.get(Calendar.DAY_OF_YEAR);
         java.sql.Date currentdate = new java.sql.Date(System.currentTimeMillis());
         long dayInMillis = 1000 * 60 * 60 *24; //1 day
         wdContext.currentContextElement().setFromDate(new Date(System.currentTimeMillis() - dayInMillis*1096 - ((dayofyear-1)*dayInMillis)));
    Please help.
    Regards,
    Gary

    Hi Gary,
    I am not pretty much clear with your question, whatever i have understood, i have found a way to get the previous date given the current date.
    Below is the code for the same.
                           Calendar now = Calendar.getInstance();//Jan 4, 2010
           String nowDateStr = DateFormat.getDateInstance().format(now.getTime());
           System.out.println("date now : " +nowDateStr);
           now.add(Calendar.YEAR, -3);//2007
           now.add(Calendar.DATE, -3);//1st
           now.add(Calendar.MONTH, 0);//No change in month, Jan.
           String changedDateStr = DateFormat.getDateInstance().format(now.getTime());
           System.out.println("date changed : " +changedDateStr);

  • Question: how to find color temperature in a psd?

    assume i assign a color temperature to an image, either in the camera or in bridge. how do i find that color temperature in the psd of the image?

    Thanks for the quick and accurate response. in Win 7, CS5.5, it's file>file info, but i'm certainly not quibbling.

  • Question:how to find administrator password using OSX?

    How can you find administrator password when you lose it caused by an error?

    Forgot Your Account Password
    For Lion/Mountain Lion
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password, OS X Mountain Lion- Reset a login password, and
         OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself

Maybe you are looking for

  • Auto Start When Device Plugged In

    Hello, Everytime I plug in a device that has pictures in it iPhoto automatically opens up. It has become quite annoying since purchasing the iPhone. How do I turn this automatic start up off? Thanks, Mark

  • Why is Safari loading pages with foreign language characters?

    Help! the websites that I frequently go to randomly load in what looks like a russian or asian characters. Sometimes they are normal, sometimes not. The body of text (paragraphs) usually are normal and the headlines and banners are foreign. Is this a

  • Nested for loop

    hello how can i implement this code in labview. i am new to labview, so plz if u design a vi of this code. for i=1:m c = (i-m/2); for j=1:n d = (j-n/2); N1(i,j)=exp(-(c^2+d^2)/c1^2); end end wher m is num of rows and n is number of column and c1 is a

  • Cannot update my apps in app store because it says " you can not update this software since you dont own a major version of the software"

    hello people, its happening since 3 days that i get a updates for my paid and free apps in app store, for my oiphone 4s, when i try to update the message pops up saying  that i " you can not update this software since you dont own a major version of

  • Naming conventions included for linked files?

    Perhaps a simple question but... if a file is only going to serve as a downloadable link (save as) do the standard naming conventions still apply? (lowercase, no spaces)  the files i am working with are dwg, pdf, zmt, jpeg, png...  my assumption is y