Sponsored Content
Top Forums Shell Programming and Scripting Shell script cannot create directory and move the file to that directory Post 302995729 by digioleg54 on Tuesday 11th of April 2017 12:15:33 PM
Old 04-11-2017
All variables are set up. Now it creates monthly directory and moves files
But this script:
Code:
 ${LOCL_WORKING_DIR}/sftp_ondemand_monthly.sh /export/applications/ibm6000/mbsesb/config/ondemand.cfg /export/applications/ibm6000/mbsesb/config/filename.lst

Doesn't start. It exists on ${LOCL_WORKING_DIR}/
 

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
CGI::Application::Plugin::ConfigAuto(3pm)		User Contributed Perl Documentation		 CGI::Application::Plugin::ConfigAuto(3pm)

NAME
CGI::Application::Plugin::ConfigAuto - Easy config file management for CGI::Application SYNOPSIS
use CGI::Application::Plugin::ConfigAuto (qw/cfg/); In your instance script: my $app = WebApp->new(PARAMS => { cfg_file => 'config.pl' }); $app->run(); In your application module: sub my_run_mode { my $self = shift; # Access a config hash key directly $self->cfg('field'); # Return config as hash %CFG = $self->cfg; } DESCRIPTION
CGI::Application::Plugin::ConfigAuto adds easy access to config file variables to your CGI::Application modules. Lazy loading is used to prevent the config file from being parsed if no configuration variables are accessed during the request. In other words, the config file is not parsed until it is actually needed. The Config::Auto package provides the framework for this plugin. RATIONALE
"CGI::Application" promotes re-usable applications by moving a maximal amount of code into modules. For an application to be fully re- usable without code changes, it is also necessary to store configuration variables in a separate file. This plugin supports multiple config files for a single application, allowing config files to override each other in a particular order. This covers even complex cases, where you have a global config file, and second local config file which overrides a few variables. It is recommended that you to declare your config file locations in the instance scripts, where it will have minimum impact on your application. This technique is ideal when you intend to reuse your module to support multiple configuration files. If you have an application with multiple instance scripts which share a single config file, you may prefer to call the plugin from the setup() method. DECLARING CONFIG FILE LOCATIONS
# In your instance script # value can also be an arrayref of config files my $app = WebApp->new(PARAMS => { cfg_file => 'config.pl' }) # OR ... # Pass in an array of config files, and they will be processed in order. $app->cfg_file('../../config/config.pl'); Your config files should be referenced using the syntax example above. Note that the key "config_files" can be used as alternative to cfg_file. The format is detected automatically using Config::Auto. It it known to support the following formats: colon separated, space separated, equals separated, XML, Perl code, and Windows INI. See that modules documentation for complete details. METHODS
cfg() # Access a config hash key directly $self->cfg('field'); # Return config as hash my %CFG = $self->cfg; # return as hashref my $cfg_href = $self->cfg; A method to access project configuration variables. The config file is parsed on the first call with a perl hash representation stored in memory. Subsequent calls will use this version, rather than re-reading the file. In list context, it returns the configuration data as a hash. In scalar context, it returns the configuration data as a hashref. config() "config()" in CGI::Application::Standard::Config is provided as an alias to cfg() for compliance with CGI::Application::Standard::Config. It always exported by default per the standard. std_config() "std_config()" in CGI::Application::Standard::Config is implemented to comply with CGI::Application::Standard::Config. It's for developers. Users can ignore it. cfg_file() # Usual $self->cfg_file('my_config_file.pl'); # Supply the first format, guess the second $self->cfg_file('my_config_file.pl',{ format => 'perl' } ); Supply an array of config files, and they will be processed in order. If a hash reference if found it, will be used to supply the format for the previous file in the array. FILE FORMAT HINTS
Perl Here's a simple example of my favorite config file format: Perl. Having the "shebang" line at the top helps "Config::Auto" to identify it as a Perl file. Also, be sure that your last statement returns a hash reference. #!/usr/bin/perl my %CFG = (); # directory path name $CFG{DIR} = '/home/mark/www'; # website URL $CFG{URL} = 'http://mark.stosberg.com/'; \%CFG; SEE ALSO
CGI::Application CGI::Application::Plugin::ValidateRM CGI::Application::Plugin::DBH CGI::Application::Standard::Config. perl(1) AUTHOR
Mark Stosberg "mark@summersault.com" LICENSE
Copyright (C) 2004 - 2011 Mark Stosberg "mark@summersault.com" This library is free software. You can modify and or distribute it under the same terms as Perl itself. perl v5.12.3 2011-06-26 CGI::Application::Plugin::ConfigAuto(3pm)
All times are GMT -4. The time now is 08:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy