Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent, need help


    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.

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    wc will count the number of lines in a file.

    type
    info wc

    for usage info

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent

    i know wc -l can do it
    but how about the database oracle how i can compare it ..

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,104
    You did not say what database

    this may help for Oracle

    SQL*Plus Documentation

  5. #5
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent

    i am writing a script for sending a mail
    when i compare the value of the two variables
    if ($int1!=$int2);then

    netcat -v comweb.conatelusa.com 25 << EOF
    HELO localhost
    MAIL FROM: ezac@conatelusa.com

    when i execute the script it wrote this message

    line 20: 25!=25: command not found
    line 40: 25!=24: command not found

  6. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    use [ and ] , not ( )
    also, you need a space after [ and one before ]

  7. #7
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent

    i did it that way it still does not work


    if [$int2!=$int3]; then

    line 40: [25!=24]: command not found

  8. #8
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    read the second line I wrote also

  9. #9
    Just Joined!
    Join Date
    Nov 2009
    Posts
    20

    urgent

    can u write it for me please, i wrote it in different ways but it still does not work

  10. #10
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    if [ $int2 != $int3 ]; then

Page 1 of 2 1 2 LastLast

Posting Permissions

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