Sponsored Content
Top Forums Shell Programming and Scripting Shell script cannot create directory and move the file to that directory Post 302995733 by vgersh99 on Tuesday 11th of April 2017 12:43:58 PM
Old 04-11-2017
I'd suggest adding set -x to the "master" script and to the /export/applications/ibm6000/mbsesb/sh/sftp_ondemand_monthly.sh script to trace their execution. This makes tracing much easier and will "flag" any potential issues with variable expansion and/or test statements...
 

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
Apache::TestTrace(3pm)					User Contributed Perl Documentation				    Apache::TestTrace(3pm)

NAME
Apache::TestTrace - Helper output generation functions SYNOPSIS
use Apache::TestTrace; debug "foo bar"; info_sub "missed it"; error_mark "something is wrong"; # test sub that exercises all the tracing functions sub test { print $Apache::TestTrace::LogFH "TraceLevel: $Apache::TestTrace::Level "; $_->($_,[1..3],$_) for qw(emerg alert crit error warning notice info debug todo); print $Apache::TestTrace::LogFH " " }; # demo the trace subs using default setting test(); { # override the default trace level with 'crit' local $Apache::TestTrace::Level = 'crit'; # now only 'crit' and higher levels will do tracing lower level test(); } { # set the trace level to 'debug' local $Apache::TestTrace::Level = 'debug'; # now only 'debug' and higher levels will do tracing lower level test(); } { open OUT, ">/tmp/foo" or die $!; # override the default Log filehandle local $Apache::TestTrace::LogFH = *OUT; # now the traces will go into a new filehandle test(); close OUT; } # override tracing level via -trace opt % t/TEST -trace=debug # override tracing level via env var % env APACHE_TEST_TRACE_LEVEL=debug t/TEST DESCRIPTION
This module exports a number of functions that make it easier generating various diagnostics messages in your programs in a consistent way and saves some keystrokes as it handles the new lines and sends the messages to STDERR for you. This module provides the same trace methods as syslog(3)'s log levels. Listed from low level to high level: emerg(), alert(), crit(), error(), warning(), notice(), info(), debug(). The only different function is warning(), since warn is already taken by Perl. The module provides another trace function called todo() which is useful for todo items. It has the same level as debug (the highest). There are two more variants of each of these functions. If the _mark suffix is appended (e.g., error_mark) the trace will start with the filename and the line number the function was called from. If the _sub suffix is appended (e.g., error_info) the trace will start with the name of the subroutine the function was called from. If you have "Term::ANSIColor" installed the diagnostic messages will be colorized, otherwise a special for each function prefix will be used. If "Data::Dumper" is installed and you pass a reference to a variable to any of these functions, the variable will be dumped with "Data::Dumper::Dumper()". Functions whose level is above the level set in $Apache::TestTrace::Level become NOPs. For example if the level is set to alert, only alert() and emerg() functions will generate the output. The default setting of this variable is warning. Other valid values are: emerg, alert, crit, error, warning, notice, info, debug. Another way to affect the trace level is to set $ENV{APACHE_TEST_TRACE_LEVEL}, which takes effect if $Apache::TestTrace::Level is not set. So an explicit setting of $Apache::TestTrace::Level always takes precedence. By default all the output generated by these functions goes to STDERR. You can override the default filehandler by overriding $Apache::TestTrace::LogFH with a new filehandler. When you override this package's global variables, think about localizing your local settings, so it won't affect other modules using this module in the same run. TODO
o provide an option to disable the coloring altogether via some flag or import() AUTHOR
Stas Bekman with contributions from Doug MacEachern perl v5.14.2 2013-03-12 Apache::TestTrace(3pm)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy