Unix Scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raveani
    New Member
    • Jul 2007
    • 1

    #1

    Unix Scripts

    Hi Friends,

    I am new to scripting and might need your help. I am trying to create a .dat file where I am storing only this line.

    sqlplus -s username/"password"@data base

    Now I want to open this .dat file and execute the command. I mean to say that I want to write a script which should access this .dat file and connect to sql. the intension to keep the connect stmt is a dat file is for security.

    Could you please let me know how I could get this done.

    Thanks,
    Ravi.
  • Chrisjc
    Contributor
    • Nov 2006
    • 375

    #2
    Originally posted by raveani
    Hi Friends,

    I am new to scripting and might need your help. I am trying to create a .dat file where I am storing only this line.

    sqlplus -s username/"password"@data base

    Now I want to open this .dat file and execute the command. I mean to say that I want to write a script which should access this .dat file and connect to sql. the intension to keep the connect stmt is a dat file is for security.

    Could you please let me know how I could get this done.

    Thanks,
    Ravi.


    Are you asking for a script that will run this .dat file on start up of the system??

    Or just how to execute it?

    Comment

    • archonmagnus
      New Member
      • Jun 2007
      • 113

      #3
      The way I understand your query is that you'd like to store, in a *.dat file, the contents:
      Code:
      sqlplus -s username/"password"@database
      And execute it with a unix script the likes of:

      Code:
      #!bin/sh
      #
      
      # Note: those are back-quotes!!!
      `more file.dat`
      Is this what your asking for?

      Comment

      Working...