Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Oop to copy and rename files through SQL Statement in shell Script

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 3 Weeks Ago   -   Original Discussion by usman_oracle
usman_oracle's Unix or Linux Image
usman_oracle usman_oracle is offline
Registered User
Join Date: Nov 2017
Last Activity: 24 November 2017, 5:07 AM EST
Posts: 10
Thanks: 5
Thanked 0 Times in 0 Posts
Oop to copy and rename files through SQL Statement in shell Script

sqlplus -s "/ as sysdba" << EOF
pt.user_concurrent_program_name , OUTFILE_NAME 
apps.fnd_concurrent_programs_tl pt, 
apps.fnd_concurrent_requests f 
pt.concurrent_program_id = f.concurrent_program_id 
and pt.application_id = f.program_application_id 
and f.RESPONSIBILITY_ID = 52431 
and trunc(f.request_date) = trunc(sysdate);

above is the code which show below output

Cotton Stock Report (Net Weight)- Customized

Daily Yarn Clearance Summary Report (NCML / ESML) -Customized

Lab Test - Customized

first row is the report name and second row is the report output location.
now i want to write loop to copy the file from output location and save to opt/report folder , Further rename it with report name column.
Sponsored Links
Old Unix and Linux 3 Weeks Ago   -   Original Discussion by usman_oracle
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Join Date: Jun 2009
Last Activity: 9 December 2017, 8:47 PM EST
Posts: 8,945
Thanks: 380
Thanked 1,238 Times in 1,052 Posts
As previously advised, please do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux Script to copy and rename files through SQL statement usman_oracle Shell Programming and Scripting 3 4 Weeks Ago 07:30 AM
Help with script to copy/rename files, then delete by date Lucid13 Shell Programming and Scripting 4 04-05-2012 03:10 PM
Simple BASH shell script to rename webcam jpg and copy into a new directory. robfindlay Shell Programming and Scripting 4 03-22-2009 02:10 AM
script to rename files with current date and copy it. logic0 UNIX for Dummies Questions & Answers 6 05-01-2007 06:13 AM

All times are GMT -4. The time now is 12:07 PM.