Sponsored Content
Full Discussion: Copy command does not work
Top Forums Shell Programming and Scripting Copy command does not work Post 302935766 by ann15 on Thursday 19th of February 2015 04:41:30 AM
Old 02-19-2015
Copy command does not work

I am new to this forum. I have a script which randomly throws error.Following are steps followed in this script:
  1. Generate Term file
  2. Remove previous term and rpt files from utility directory.
  3. copy term file to utility directory
  4. call sql to generate rpt file using term file as input
  5. copy the generated rpt file from run directory to utility directory.
I get error from sql as :
Code:
ORA-29283 - Invalid file operation.

This happens when term file is not present in utility directory when sql is called.

Code snippet is shown below. Please ignore the syntax error, if any.
Code:
> RUN_DIR/nj.terms
if [[ -s RUN_DIR/nj.terms ]] then
rm -f /utl/nj.terms
rm -f /utl/nj.rpt
cp RUN_DIR/nj.terms utl

/bin/sqlplus USER PSWD @sql

cp utl/nj.RPT RUN_DIR

fi

After script runs, if we check utility directory we can find term fileSmilie
This error occurs randomly. Is there any chance system takes more time to copy the Term file to Utility directory and before completing the copy command, sql started running?

Moderator's Comments:
Mod Comment Thread moved. Please post in the correct forum ...

Last edited by rbatte1; 02-19-2015 at 01:42 PM..
 

10 More Discussions You Might Find Interesting

1. HP-UX

ls command doesnt work

Good Day I mistakely renamed the dld.sl file in the /usr/lib directory. When i try to ls/ftp into the box i get this error :eek: crt0: ERROR couldn't open /usr/lib/dld.sl errno:000000002 I have tried to rename it back from the renamed file to the original file name, but it gives me the... (2 Replies)
Discussion started by: shawnbishop
2 Replies

2. UNIX for Dummies Questions & Answers

Command work but not in SH script

Command works but not in SH At terminal if i type: scp test.tar.gz user1@server2:/home/user Everything run smoothly (keyed, no password need) At script , test.sh #!/bin/sh scp test.tar.gz user1@server2:/home/user Nothing happen and clue ? ? ? ? ? (3 Replies)
Discussion started by: cititester
3 Replies

3. UNIX for Dummies Questions & Answers

at command does not work

at command does not work with graphic programs like firefox, evolution, etc It works with other commands for example: at now shutdown -h now OK but at now firefox does not work Anyone knows if its possible to open a firefox window at a scheduled time? Thanks Jose (0 Replies)
Discussion started by: otilesoj
0 Replies

4. Shell Programming and Scripting

How to make copy work faster

I am trying to copy a folder which contains a list of C executables. It takes 2 mins for completion,where as the entire script takes only 3 more minutes for other process. Is there a way to copy the folder faster so that the performance of the script will improve? (2 Replies)
Discussion started by: prasperl
2 Replies

5. UNIX for Dummies Questions & Answers

Copy a command string from the command line

How can we copy a command string from a previous command line and paste it into the cursor position on the current command line? I know that ^c will not work as the shell will interpret as an interrupt signal. Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies

6. Shell Programming and Scripting

scp : recursive copy doesn't work

Hi I have a problem with scp command : I try to copy a list of files from source to destination, it works fine but if there is a directory not existing on destination, it doesn't automatic create. Syntax : scp -rp /<PATH>/<NEW_DIR>/<FILE> <USER_DEST>@<HOST_DEST>:<PATH>/<NEW_DIR>/<FILE>... (5 Replies)
Discussion started by: madmat
5 Replies

7. Shell Programming and Scripting

command does not work

need help, trying make a command where the user presses any keys and it will go to the home page, however it doesnt work, why ? echo -p "press any key to return to main menu" menu if ]; then echo -p "\n" home fi (5 Replies)
Discussion started by: bassmasta1
5 Replies

8. UNIX for Dummies Questions & Answers

copy *. does not work in function

Hi, I want to copy a file/directory ( recursively , if needed) and if destination directory does not exist create it ( with parent directory, if needed). funcopy () { if ; then echo "$2 exists , copying files" cp -r "$1" "$2" else echo "Directory does not exist;Create directory" mkdir... (1 Reply)
Discussion started by: greet_sed
1 Replies

9. UNIX for Dummies Questions & Answers

grep command does not work

Hello. I have a question as to why my grep command does not seem to be working. grep -c '^?*' ~ grep -c '^.*' ~ I wanted to count the number of files starting with the letter K and have some letters after that. I have such files in my home directory. However, the output is 0. So, I have no... (2 Replies)
Discussion started by: FUTURE_EINSTEIN
2 Replies

10. Programming

Shell copy command don't work

I want copy Files: But cp don't work: shell_exec("cp ".$pfad." ".$genzone); shell_exec("cp ../Chrysanthemum.jpg ../test"); Whats wrong? (3 Replies)
Discussion started by: Linuxmann
3 Replies
Mail::SPF::Term(3)					User Contributed Perl Documentation					Mail::SPF::Term(3)

NAME
Mail::SPF::Term - SPF record term class DESCRIPTION
An object of class Mail::SPF::Term represents a term within an SPF record. Mail::SPF::Term cannot be instantiated directly. Create an instance of a concrete sub-class instead. Constructor The following constructor is provided: new(%options): returns Mail::SPF::Term Abstract. Creates a new SPF record term object. %options is a list of key/value pairs, however Mail::SPF::Term itself specifies no constructor options. new_from_string($text, %options): returns Mail::SPF::Term; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidTerm Abstract. Creates a new SPF record term object by parsing the string and any options given. Class methods The following class methods are provided: name_pattern: returns Regexp Returns a regular expression that matches any legal name for an SPF record term. Instance methods The following instance methods are provided: text: returns string; throws Mail::SPF::ENoUnparsedText Returns the unparsed text of the term. Throws a Mail::SPF::ENoUnparsedText exception if the term was created synthetically instead of being parsed, and no text was provided. name: returns string Abstract. Returns the name of the term. SEE ALSO
Mail::SPF, Mail::SPF::Record, Mail::SPF::Mech, Mail::SPF::Mod <http://tools.ietf.org/html/rfc4408> For availability, support, and license information, see the README file included with Mail::SPF. AUTHORS
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> perl v5.18.2 2017-10-06 Mail::SPF::Term(3)
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy