Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by kasparov

  1. kasparov

    Restore from hot backup with no archive logs

    OK Thanks karluk - what you say makes sense. It's just for testing so I'll live with applying just 1 log file. (once I work out how to script it) Cheers, Chris
  2. kasparov

    Restore from hot backup with no archive logs

    This is probably a very basic question so apologies for asking. I'm cloning my live database. I have files from a hot backup (we don't use RMAN). I create a text copy of the control file, edit it accordingly & run it. I then get the reply "Control file created" which looks good. I can...
  3. kasparov

    Your advice and opinion on editing files in scripts

    Thanks for the responses chaps. ... ruby ... perl ... it's all a bit much for me. I'll stick with good old sed :-) Star for feherke as I used his suggestion but thanks again to both.
  4. kasparov

    Your advice and opinion on editing files in scripts

    OK - sounds good. I like the first example as then the code is all in one file. I'll use that & report back. Thanks feherke
  5. kasparov

    Your advice and opinion on editing files in scripts

    I'm curious to hear what people think about tbe best way to edit files automatically in a script. I'm making edits to a number of lines in a file (10+ lines need changing). It's straightforward editing which never varies so it's easy to do but what method would you use? The way I'm doing it...
  6. kasparov

    edit file to extract certain lines only - sed probably

    God bless the semi-colon :-) It works . Thanks you feherke
  7. kasparov

    edit file to extract certain lines only - sed probably

    Thanks for the reply feherke Unfortunately I'm getting sed: command garbled: /^STARTUP NOMOUNT/,/^;/{p;/q} I'm on Solaris 10. What exactly should {p;/^;/q} do? I'm guessing it's: p - print /^;/q - don't print after the semi-colon That's what I'm aiming for anyway. Cheers, Chris
  8. kasparov

    edit file to extract certain lines only - sed probably

    I want to automatically edit the file produced from an Oracle database by running this: alter database backup controlfile to trace; so that I only get the first definition of the control file - i.e. the first part that begins STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "OUT_DATABASE"...
  9. kasparov

    copy picture based on a variable

    Thanks you Tony - easy when you know how. But I didn't :-)
  10. kasparov

    copy picture based on a variable

    I want to copy a certain picture (photo) from one sheet to another depending on the value of a variable. So if the variable = 1 then I copy Picture 1 if it's 2 I copy Picture 2 etc. I have this to copy a hardcoded picture: Sub CopyOnePicture() Dim wsSource As Worksheet Dim wsDest As...
  11. kasparov

    Pass parameter to sqlplus

    It works! Thank you annihilannic. I had tried $1 but had not previously surrounded it by single quotes. When the script looks like this: #!/bin/ksh ## ## ## set oracle variables up ORACLE_SID=cflive ORA_NLS10=/cfldbap/oracle/product/10.2.0/nls/data...
  12. kasparov

    Pass parameter to sqlplus

    Sorry - I should have added that I'd already tried that: $ ./test_sql param1 ++++++ param1 ++++++ SQL*Plus: Release 10.2.0.4.0 - Production on Thu Sep 10 09:08:35 2009 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release...
  13. kasparov

    Pass parameter to sqlplus

    I want to run a script with a parameter & then pass the parameter to some sql code in the script. I've spent a long time looking on the web & none of the suggestions I can find works: Here's a simplified version of the script called test_sql: #!/bin/ksh ## ## ## set oracle variables up...
  14. kasparov

    file access time (older than 6 months)

    Sorry - should have said - it's Solaris 9. There's a stat function but no OS command (I don't want to try writing a program to do this) & PHV - I assume these are flags to the ls command? My version of ls doesn't offer the -T option. Looks like I can't get it directly from the OS - thanks anyway
  15. kasparov

    file access time (older than 6 months)

    If a file is older than 6 months ls -l doesn't show the time it was accessed. I assume this information is still held against the file - is there any way I can get it? Thanks, Chris

Part and Inventory Search

Back
Top