The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-26-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
Why? The sqlldr "data=" command line parameter overrides the INFILE parameter. Also, you can simply remove it from the file altogether using vi.

But if you are really want to do it the way that you described, you can use sed.

Code:
sed -e "s/\(INFILE \).*/\1'newfile.csv'/" yourcontrolfile.ctl > newcontrolfile.ctl
or more specifically:
Code:
sed -e "s/\(INFILE \).*/\1'${YOURVARIABLE}'/" yourcontrolfile.ctl > newcontrolfile.ctl