Sponsored Content
Top Forums Shell Programming and Scripting Shell script cannot create directory and move the file to that directory Post 302995732 by digioleg54 on Tuesday 11th of April 2017 12:36:12 PM
Old 04-11-2017
No, I put print statement inside. I goes inside if statement, prints everything, but doesn't start the script
Code:
 if [ -f report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ]
then
        echo "We are in report" >> ${LOGF}
        mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
        mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR
}/cool_${Today}/monthly
        echo "Before sftp_ondemand_monthly.sh">>${LOGF}
        echo "${LOCL_WORKING_DIR}/sftp_ondemand_monthly.sh /export/applications/
ibm6000/mbsesb/config/ondemand.cfg /export/applications/ibm6000/mbsesb/config/filename.lst" >>${LOGF}
        ${LOCL_WORKING_DIR}/sftp_ondemand_monthly.sh /export/applications/ibm600
0/mbsesb/config/ondemand.cfg /export/applications/ibm6000/mbsesb/config/filename.lst
        echo "After sftp_ondemand_monthly.sh">>${LOGF}
else
        echo "There is no report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv file ${Today}"
fi

OUTPUT
Code:
 We are in report
Before sftp_ondemand_monthly.sh
 
/export/applications/ibm6000/mbsesb/sh/sftp_ondemand_monthly.sh /export/applications/ibm6000/mbsesb/config/ondemand.cfg /export/applications/ibm6000/mbsesb/config/filename.lst
 
After sftp_ondemand_monthly.sh

No error messages, nothing
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

2. Shell Programming and Scripting

A script that will move a file to a directory with the same name and then rename that file

Hello all. I am new to this forum (and somewhat new to UNIX / LINUX - I started using ubuntu 1 year ago).:b: I have the following problem that I have not been able to figure out how to take care of and I was wondering if anyone could help me out.:confused: I have all of my music stored in... (7 Replies)
Discussion started by: marcozd
7 Replies

3. Shell Programming and Scripting

Move the latest or older File from one directory to another Directory

I Need help for one requirement, I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix. Example: Source Directory : \a destination Directory : \a\b File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt) File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies

4. Shell Programming and Scripting

How we can create the master file through shell to show the tree structure of the directory?

Can we create the master file that show the whole tree structure of the directory till a particular folder? Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

5. Shell Programming and Scripting

Script to move latest zip file to another directory

Hi folks, In my application there is a job running which create a .dat file along with it zip file also at unix box location /opt/app/cvf/temp1 so in temp1 directory I have one .dat file and its zip file also. Now since this job runs every day so if a job runs today there will be two files... (5 Replies)
Discussion started by: punpun66
5 Replies

6. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

7. Shell Programming and Scripting

Move file in to directory- script

Hi In directory /mnt/upload I have about 100 000 files (*.png) that have been created during the last six months. Now I need to move them to right folders. eg: file created on 2014-10-10 move to directory /mnt/upload/20141010 file created on 2014-11-11 move to directory /mnt/upload/20141111... (6 Replies)
Discussion started by: primo102
6 Replies

8. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

9. Shell Programming and Scripting

How Create new directory and move files to that directory.?

Hi All, We have main directory called "head" under this we have several sub directories and under these directories we have sub directories. My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well. And create... (14 Replies)
Discussion started by: ROCK_PLSQL
14 Replies
override_config_file(3alleg4)					  Allegro manual				     override_config_file(3alleg4)

NAME
override_config_file - Specifies a file containing config overrides. Allegro game programming library. SYNOPSIS
#include <allegro.h> void override_config_file(const char *filename); DESCRIPTION
Specifies a file containing config overrides. These settings will be used in addition to the parameters in the main config file, and where a variable is present in both files this version will take priority. This can be used by application programmers to override some of the config settings from their code, while still leaving the main config file free for the end user to customise. For example, you could spec- ify a particular sample frequency and IBK instrument file, but the user could still use an `allegro.cfg' file to specify the port settings and irq numbers. The override config file will not only take precedence when reading, but will also be used for storing values. When you are done with using the override config file, you can call override_config_file with a NULL parameter, so config data will be directly read from the current config file again. Note: The override file is completely independent from the current configuration. You can e.g. call set_config_file, and the override file will still be active. Also the flush_config_file function will only affect the current config file (which can be changed with set_con- fig_file), never the overriding one specified with this function. The modified override config is written back to disk whenever you call override_config_file. Example: override_config_file("my.cfg"); /* This will read from my.cfg, and if it doesn't find a * setting, will read from the current config file instead. */ language = get_config_string("system", "language", NULL); /* This will always write to my.cfg, no matter if the * settings is already present or not. */ set_config_string("system", "language", "RU"); /* This forces the changed setting to be written back to * disk. Else it is written back at the next call to * override_config_file, or when Allegro shuts down. */ override_config_file(NULL); Note that this function and override_config_data() are mutually exclusive, i.e. calling one will cancel the effects of the other. SEE ALSO
override_config_data(3alleg4), set_config_file(3alleg4) Allegro version 4.4.2 override_config_file(3alleg4)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy