Linux Script to copy and rename files through SQL statement
Hi,
I require help to complete below requirement through Linux Script.
I have a SQL query which shows two columns as output. One is Report Name and other is report path. Query return multiple rows. below is the output.
Code:
Report Name
Cotton Stock Report (Net Weight)- Customized
Output Path
/opt/ora/oracle/inst/apps/PROD_prodapps/logs/appl/c onc/out/o16728954.out
Report Name
Daily Yarn Clearance Summary Report (NCML / ESML) -Customized
Output Path
/opt/ora/oracle/inst/apps/PROD_prodapps/logs/appl/c onc/out/o16728991.out
Report Name
Freight & Weight Of Arrival - Customized
Output Path
/opt/ora/oracle/inst/apps/PROD_prodapps/logs/appl/c onc/out/o16729009.out
Now requirement is to copy the file from output path to /opt/reports
further rename the report name which is in output path after out/ with .out extension
with the name in Report name column.
So script will copy the files and rename them in a loop, so that all the records available in the select statement will be copy and renamed.
below is the SQL Query.
Code:
Select
pt.user_concurrent_program_name ,
OUTFILE_NAME
FROm
apps.fnd_concurrent_programs_tl pt,
apps.fnd_concurrent_requests f
where
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)
Last edited by vbe; 11-13-2017 at 04:53 AM..
Reason: code tags...
Hi all,
I am a newbie in writng unix..I am using ksh shell..Does anyone know how to copy a list o files from directory A to directory B with differnt names? i.e
in Dir A, I have
RPT101.555.TXT
RPT102.666.TXT
and I want to copy those files to dir B with new naming convention..
in Dir B,... (7 Replies)
I have few webservers logs like access.log. which would be growing everyday.
what i do everyday is, take the backup of access.log as access.log_(currentdate) and nullify the access.log.
So thought of writing a script... but stuck up in middle.
My requirement: to take the backup and nullify... (6 Replies)
hello, I need to build a shell script that receives the folder to copy by parameter and copy all files except thumb.db to another folder and rename them like, file.jpg renamed to file_bb1.jpg.
can someone help me
Thanks (4 Replies)
hello,
I am write a Script and i would listing all Files from Path1 out with DSR*.txt and give a new name an copy to the Path2.
I have problems with that to rename. Someone can help me?
Sorry, for my english. My english is not gut.
I hope you understand my.
That is my Script.
... (2 Replies)
Hi All,
I am new to scripting and am looking for some assistance setting up a script. Basically I need the script to scan a folder for the newest files and make a copy of those files, adding a month to the date stamp. I also need this script to delete the previously copied files to save space.... (4 Replies)
Hi,
I need help in shell scripting. If someone can help me, that would be great!
Problem. I want Linux Script to compare two folders and copy missing files.
Description.
I have two directories
/dir1
/dir2
I need to copy all distinct/new/unique/missing files from /dir1 and that... (1 Reply)
I need to pull down a good bit of files for another support team for an upgrade project. I have a server.list with all of the server names.
I need to do two parts:
FIRST:
I have this example, but it does not list the server name in front of each line.
#! /bin/bash
for server in $(<... (10 Replies)
Is better way to write the script loop through one by one "Old_File_1: & New_File_1:" to copy 100 files to /staging/test folder then re-name & gzip all those files? I wrote this code below and don't like that much. Thanks
I have a control_file under /tmp/test folder like below 100 files and... (10 Replies)
#!/bin/sh
sqlplus -s "/ as sysdba" << EOF
SET HEADING OFF
SET FEEDBACK OFF
Select
pt.user_concurrent_program_name , OUTFILE_NAME
FROm
apps.fnd_concurrent_programs_tl pt,
apps.fnd_concurrent_requests f
where
pt.concurrent_program_id = f.concurrent_program_id
and pt.application_id =... (1 Reply)
Discussion started by: usman_oracle
1 Replies
LEARN ABOUT DEBIAN
log::report::translator::pot
Log::Report::Translator::POT(3pm) User Contributed Perl Documentation Log::Report::Translator::POT(3pm)NAME
Log::Report::Translator::POT - translation based on POT files
INHERITANCE
Log::Report::Translator::POT
is a Log::Report::Translator
SYNOPSIS
# internal use
my $msg = Log::Report::Message->new
( _msgid => "Hello World
"
, _domain => 'my-domain'
);
print Log::Report::Translator::POT
->new(lexicon => ...)
->translate('nl-BE', $msg);
# normal use (end-users view)
use Log::Report 'my-domain'
, translator => Log::Report::Translator::POT->new;
print __"Hello World
";
DESCRIPTION
Translate a message by directly accessing POT files. The files will load lazily (unless forced). To module attempts to administer the
PO's in a compact way, much more compact than Log::Report::Lexicon::PO does.
METHODS
Constructors
Log::Report::Translator::POT->new(OPTIONS)
-Option --Defined in --Default
charset Log::Report::Translator <from locale>
lexicon Log::Report::Translator <see text>
charset => STRING
lexicon => DIRECTORY|ARRAY-of-DIRECTORYs
Accessors
$obj->charset
See "Accessors" in Log::Report::Translator
$obj->lexicons
See "Accessors" in Log::Report::Translator
Translating
$obj->load(DOMAIN, LOCALE)
See "Translating" in Log::Report::Translator
$obj->translate(MESSAGE)
See "Translating" in Log::Report::Translator
SEE ALSO
This module is part of Log-Report distribution version 0.94, built on August 23, 2011. Website: http://perl.overmeer.net/log-report/
LICENSE
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2011-08-23 Log::Report::Translator::POT(3pm)