Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11


    thanks a lot, guy
    but now how can u help me solve this problem.
    i need your help. it's very urgent

    i have a file containing a lot of records, a loader is loading all lines and inserting them in a database.
    i want to write a script in linux that counts if the number of records in the files is the same as in the database oracle.

    i can not the command for connecting with the database oracle in the script.


  2. #12
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    No sorry, as I am a little afraid.
    The bash hint was pretty basic, oracle is more complicated and I have no idea in what condition that oracle server is.

    That said, I give you some rough pointers:
    Basically, you would call sqlplus to connect with the right user,
    then have it execute a SELECT COUNT(<tablename_of_your_choice>)
    The result would be stripped to have only the number and saved by the shell script and evaluated against the number in th text file.

    You do realize, that this would work only once?
    Next time something got imported incrementally to DB, the numbers of DB and file *will* be different. So you would need a timestamp or uniq identifier to compare and therefore a more complex shell script and textfile and DB.

    What about error conditions?
    File invalid, DB down, import was only partially done,....?

    Maybe it's better to tune the import process.
    Check and validate the source according to your needs.
    Use a sql transaction for import.
    If the import fails, rollback
    If the import succeeds, trust that the numbers are correct.

    The validation + the transaction should be enough to ensure that.

  3. #13


    i want to received a sms n my mobil phone
    but i want to use the command WGET IN UNIX.

    wget '


  4. $spacer_open
  5. #14


    i get the sms now
    it's ok

  6. #15
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    West (by God) Virginia
    Please start a new thread for new problems in the future


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts