|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script to pick the files from source folder
Hi,
I wrote a script to pick files based on some logic. when I execute my script, I get the below message ( I bolded the lines in the script where this error message shows up), it says that files are not available and it is a valid scenario if the files are not available and I don't know how to get rid of this message.. I am guessing this is a warning not an error as my script continues after this message..can someone help me on how to get rid of this message? Message: ls: FERAL_DATA_*_20121213.FERAL_DAT.TXT: No such file or directory ls: FERAL_CONTROL_20121213.FERAL_CTRL.TXT: No such file or directory below is my script..as I am new to unix scripting, I have posted the script to get suggestions from experts.. like I may missed something.. or could have done it in a better way.. please help me! PHP Code:
Last edited by Vijay81; 02-03-2012 at 01:57 PM.. |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Did you set SOURCE_FOLDER variable in /opt/informatica/infa_shared/SCRIPTS/env_file.ksh ? Could you please give us the output of : Code:
env as well as Code:
cat /opt/informatica/infa_shared/SCRIPTS/env_file.ksh ? Did you check that your files at OS level really contains a pattern that match the date that is picked up from your DB ? ---------- Post updated at 10:38 PM ---------- Previous update was at 10:33 PM ---------- Is you database oracle or informatica ? You should have Code:
#!/bin/sh # pickdate_paramfile1.sh ###script to pick the files based on the date of run and generate a parameter file ##### and NOT: Code:
# pickdate_paramfile1.sh ###script to pick the files based on the date of run and generate a parameter file ##### #!/bin/sh the shebang line #!/bin/sh should be the very first line in your script |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
hi CTSGNB,
thanks for respnding. below are the details you asked for: env: PHP Code:
PHP Code:
I am on LINUX. Data_Files and control files variables can have no values.. it is not a must that they should have values.. means it a valid scenario not to have files in the directory.But at the same time, I want to get rid of the message that says ls: FERAL_DATA_*_20121213.FERAL_DAT.TXT: No such file or directory ls: FERAL_CONTROL_20121213.FERAL_CTRL.TXT: No such file or directory thanks! Last edited by Vijay81; 02-06-2012 at 01:04 PM.. |
|
#4
|
|||
|
|||
|
Do this : Code:
cd /opt/informatica/infa_shared/SrcFiles ls FERAL_DATA_*_20121213.FERAL_DAT.TXT ... and tell me what output and/or error message you get ? also show what command line do you use when you launch your script ? Last edited by ctsgnb; 02-06-2012 at 11:29 AM.. |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
I get the same error message:
$ cd /opt/informatica/infa_shared/SrcFiles $ ls FERAL_DATA_*_20121213.FERAL_DAT.TXT ls: FERAL_DATA_*_20121213.FERAL_DAT.TXT: No such file or directory I am not sure if I got your question about the command line... as it is a .sh script, I execute it like- ./scriptname.sh parameter thanks! |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
It means what it says -- there's no files matching that in the current directory. What files do you have, or where?
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Quote:
|
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script for moving files from one folder to other | lalitkumar | Shell Programming and Scripting | 8 | 12-15-2008 06:32 AM |
| Script for moving files from one folder to other | lalitkumar | Shell Programming and Scripting | 2 | 11-26-2008 07:27 AM |
| script for Finding files in a folder and copying to another folder | satish2712 | Shell Programming and Scripting | 5 | 09-11-2008 04:07 PM |
| Script to pick out files from a file which are older than 15 days | viv1 | Shell Programming and Scripting | 1 | 04-02-2008 09:42 AM |
| Suppres error message when moving files from empty source folder | Steven | Shell Programming and Scripting | 2 | 11-19-2001 12:25 PM |
|
|