Sponsored Content
Top Forums Shell Programming and Scripting Moving files from one directory to another based on 2 date variables Post 302659951 by dsfreddie on Thursday 21st of June 2012 05:17:15 PM
Old 06-21-2012
Hi Corona,

I made the change you suggested.Here is what I see in logs now, (looks like soemthing is still wrong :-(

Quote:
++ cat /iis_dev_data3/wcc/cpmg/tmp/CPMGPERDynamicDateFile.txt
++ grep P_BUS_DATE
++ cut -d= -f2
+ export DYN_BUS_DATE=20120625
+ DYN_BUS_DATE=20120625
++ cat /iis_dev_data3/wcc/cpmg/tmp/CPMGPERDynamicDateFile.txt
++ grep P_SUB_DATE
++ cut -d= -f2
+ export P_SUB_DATE=20120603
+ P_SUB_DATE=20120603
+ Date_Current=20120625
+ Date_Previous=20120603
+ IFS=_
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/20120609 EMPLOYEE.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/20120618 EMPLOYEE.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/20120619 EMPLOYEE.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/20120622 EMPLOYEE.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/CallParam.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
+ for EMPLOYEE in '/iis_dev_data3/wcc/cpmg/tmp/*.txt'
+ set -- /iis dev data3/wcc/cpmg/tmp/convertfuntionn.txt
+ '[' /iis '>' 20120603 ']'
+ '[' /iis = 20120603 ']'
+ '[' /iis = 20120625 ']'
Thanks
Freddie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Moving files based on creation date

Howdy, I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!! Thanks! :D (1 Reply)
Discussion started by: dgoyea
1 Replies

2. Shell Programming and Scripting

Moving file to directory based on condition.

Can any one help me to correct following script. I have 2 directories DropZone and ProcessZone. File pattern is *VEHDESCSUM*. Finding the 'no of files' in DropZone directory using ls *VEHDESCSUM* |wc -l If DropZone has more than one file or 0 files then exit 1 If DropZone has one file then... (2 Replies)
Discussion started by: ramanagh
2 Replies

3. Shell Programming and Scripting

Sorting Files by date and moving files in date order

I need to build a k shell script that will sort files in a directory where files appear like this "XXXX_2008021213.DAT. I need to sort by date in the filename and then move files by individual date to a working folder. concatenate the files in the working folder then start a process once... (2 Replies)
Discussion started by: rebel64
2 Replies

4. Shell Programming and Scripting

Creating date directory and moving files into that directory

I have list of files named file_username_051208_025233.log. Here 051208 is the date and 025233 is the time.I have to run thousands of files daily.I want to put all the files depending on the date of running into a date directory.Suppose if we run files today they should put into 05:Dec:08... (3 Replies)
Discussion started by: ravi030
3 Replies

5. Shell Programming and Scripting

Need script to select multiple files from archive directory based on the date range

hi all, here is the description to my problem. input parameters: $date1 & $date2 based on the range i need to select the archived files from the archived directory and moved them in to working directory. can u please help me in writing the code to select the multiple files based on the... (3 Replies)
Discussion started by: bbc17484
3 Replies

6. UNIX for Dummies Questions & Answers

Moving Directories Based on Modified date

Hi, How can I move directories (and all sub directories/files) from one directory to another based on the modified date of the directory? Currently the existing structure looks like this: /public_html/media/videos/tmb/34947/image1.jpg /public_html/media/videos/tmb/34947/image2.jpg ... (0 Replies)
Discussion started by: lbargers
0 Replies

7. Shell Programming and Scripting

Move files from one directory to another based on creation/modification date

Hi All, Really stuck up with a requirement where I need to move a file (Lets say date_Employee.txt--the date will have different date values like 20120612/20120613 etc) from one directory to another based on creation/modification dates. While visiting couple of posts, i could see we can... (3 Replies)
Discussion started by: dsfreddie
3 Replies

8. UNIX for Dummies Questions & Answers

Script moving files based on date

Hi, I need a script that moves files based on date to a folder. The folder should be created based on file date. Example is : Date file name ----- -------- Oct 08 07:39 10112012_073952.xls Oct 09 07:39 10112012_073952.xls Oct 10 07:39 ... (6 Replies)
Discussion started by: rockingvj
6 Replies

9. UNIX for Dummies Questions & Answers

Unable to find files, those can be present anywhere in the directory tree,based on its creation date

Hi I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job. Please help (2 Replies)
Discussion started by: sam192837465
2 Replies

10. UNIX for Beginners Questions & Answers

Searching for a files based on current date directory

Hi All, I've been trying to do some recursive searching but not been very successful. Can someone please help. Scenario: I have directory structure /dir1/dir2/dir3/ 2019/ 11/ 17 18 19 20 so what I want to do is run a script and as its 2019/11/18/ today it would go and only search... (3 Replies)
Discussion started by: israr75
3 Replies
IIS(3pm)						User Contributed Perl Documentation						  IIS(3pm)

NAME
PDL::Graphics::IIS - Display PDL images on IIS devices (saoimage/ximtool) SYNOPSIS
use PDL::Graphics::IIS; saoimage ( -geometry => '800x800' ); iis rvals(100,100); DESCRIPTION
This module provides an interface to any image display 'device' which support the 'IIS protocol' - viz the SAOimage and Ximtool X-windows programs, the old SunView imtool program and presumably even the original IIS CRT itself if they aren't all in museums! These programs should be familiar to astronomer's - they are used by the common IRAF system. The programs and their HTML documentation can be obtained from the following URLs: SAOimage: http://tdc-www.harvard.edu/software/saoimage.html Ximtool: http://iraf.noao.edu/iraf/web/projects/x11iraf/x11iraf.html Non-astronomer's may find they quite nifty for displaying 2D data. The Perl variable $stdimage is exported from the module and controls the frame buffer configuration currently in use. The default value is "imt1024" which specifies a "1024x1024" frame buffer. Other values supported by the module are: imt512, imt800, imt1024, imt1600, imt2048, and imt4096. If you have a $HOME/.imtoolrc you can use it to specify other frame buffer names and configurations in exactly the same way you can in IRAF. Here is a sample file: -------------------snip------------------------- # Format: configno nframes width height 1 2 512 512 # imt1|imt512 2 2 800 800 # imt2|imt800 3 2 1024 1024 # imt3|imt1024 4 1 1600 1600 # imt4|imt1600 5 1 2048 2048 # imt5|imt2048 6 1 4096 4096 # imt6|imt4096 7 1 8192 8192 # imt7|imt8192 8 1 1024 4096 # imt8|imt1x4 9 2 1144 880 # imt9|imtfs full screen (1152x900 minus frame) 10 2 1144 764 # imt10|imtfs35 full screen at 35mm film aspect ratio -------------------snip------------------------- (Note: some versions of SAOimage may not even work if this file is not present. If you get funny error messages about 'imtoolrc' try copying the above to $HOME/.imtoolrc or /usr/local/lib/imtoolrc) The Perl variable $iisframe is also exported from the module and controls which display frame number to use in programs such as Ximtool which supports multiple frames. This allows you to do useful things such as blink between images. The module communicates with the IIS device down FIFO pipes (special UNIX files) - unlike IRAF this module does a pretty decent job of intelligently guessing which file names to use for the pipes and will prompt for their creating if absent. Also if SAOimage or Ximtool are started from within Perl using the module this will guarantee correct file names! FUNCTIONS
iis Displays an image on a IIS device (e.g. SAOimage/Ximtool) iis $image, [ { MIN => $min, MAX => $max, TITLE => 'pretty picture', FRAME => 2 } ] iis $image, [$min,$max] (image(m,n),[\%options]) or (image(m,n),[min(),max()]) Displays image on a IIS device. If "min()" or "max()" are omitted they are autoscaled. A good demonstration of PDL threading can be had by giving "iis()" a data *cube* - "iis()" will be repeatedly called for each plane of the cube resulting in a poor man's movie! If supplied, "TITLE" is used to label the frame, if no title is supplied, either the "OBJECT" value stored in the image header or a default string is used (the title is restricted to a maximum length of 32 characters). To specify which frame to draw to, either use the package variable $iisframe, or the "FRAME" option. iiscur Return cursor position from an IIS device (e.g. SAOimage/Ximtool) ($x,$y) = iiscur($ch) This function puts up an interactive cursor on the IIS device and returns the "($x,$y)" position and the character typed ($ch) by the user. iiscirc Draws a circle on a IIS device (e.g. SAOimage/Ximtool) (x(),y(),radius(),colour()) iiscirc $x, $y, [$radius, $colour] Draws circles on the IIS device with specied points and colours. Because this module uses PDL::PP threading you can supply lists of points via 1D arrays, etc. An amusing PDL idiom is: pdl> iiscirc iiscur Note the colours are the same as IRAF, viz: 201 = cursor color (white) 202 = black 203 = white 204 = red 205 = green 206 = blue 207 = yellow 208 = cyan 209 = magenta 210 = coral 211 = maroon 212 = orange 213 = khaki 214 = orchid 215 = turquoise 216 = violet 217 = wheat saoimage Starts the SAOimage external program saoimage[(command line options)] Starts up the SAOimage external program. Default FIFO devices are chosen so as to be compatible with other IIS module functions. If no suitable FIFOs are found it will offer to create them. e.g.: pdl> saoimage pdl> saoimage( -geometry => '800x800' ) ximtool Starts the Ximtool external program ximtool[(command line options)] Starts up the Ximtool external program. Default FIFO devices are chosen so as to be compatible with other IIS module functions. If no suitable FIFOs are found it will offer to create them. e.g. pdl> ximtool pdl> ximtool (-maxColors => 64) BUGS
None known AUTHOR
Copyright (C) Karl Glazebrook 1997. All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. perl v5.14.2 2012-05-30 IIS(3pm)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy