Sponsored Content
Top Forums UNIX for Dummies Questions & Answers moving files based on condition Post 302603255 by ctsgnb on Wednesday 29th of February 2012 11:27:31 AM
Old 02-29-2012
The creation of your file /home/mydir/badfile.txt

will not be finished until you are done with the "while" loop.

so maybe instead of
Code:
...
echo "$FN" >> /home/mydir/badfile.txt
##-- here we have to send the email with attachment of all the bad files which is listed in badfile.txt. 
  fi
done < /home/mydir/flist.txt



You should considere

Code:
echo "$FN" >> /home/mydir/badfile.txt
fi
done < /home/mydir/flist.txt
##-- here we have to send the email with attachment of all the bad files which is listed in badfile.txt

does it make sens ?
 

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

Moving the files based on count and time.

Hi, I have a requirement ,let us say 1000 files needs to be transferred in an hour from one path to another path and if the files (1000 files) are transferred within an hour ( say 40 mins), then the process should remain idle for the remaining time ( 20 mins). (3 Replies)
Discussion started by: Asaikarthik
3 Replies

4. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

5. UNIX for Advanced & Expert Users

Moving multiple files based on the pattern

I want to search for a particular file name patterns and move them to a specific folder, is it possible to do it with awk or sed? (1 Reply)
Discussion started by: rudoraj
1 Replies

6. 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

7. Shell Programming and Scripting

Moving files based on file creation

Hi, I have a directory having so many number of files. Now I want to move the files which are older than one month (lets say) from this directory to another directory (say BKP dir). Simply, if file is olderthan one month move it from source1 dir to BKP1 dir. My file names doesn't have... (7 Replies)
Discussion started by: karumudi7
7 Replies

8. Shell Programming and Scripting

Moving files based on size (string to integer)

I have a log file that I want to archive out as it reaches 100MB. I am using the following to get the file size into a variable but get the error "line 5: filesize=$(wc -c < logfile.log) if then echo "is greater than 100M" else echo "is less than 100M" fi I'm sure there's something... (2 Replies)
Discussion started by: Flakman
2 Replies

9. Shell Programming and Scripting

Moving files based on file name

Hi All, I have multiple files in the folder, I want to move those files into the other folder on based of name File names: Template_server1_01==> Template_server1_02==>To one directory /Server1 Template_server1_03==> Template_server2_01==> Template_server2_02==>To one... (9 Replies)
Discussion started by: sharsour
9 Replies

10. Shell Programming and Scripting

Moving old files based on pattern

Hi all I am trying to loop through a directory of files using a given search pattern. some of the files will be duplicated due to the pattern, but of the duplicate files i wanted to move the older files to another location. Is there any straightforward way of doing this ? One of ways I... (1 Reply)
Discussion started by: sthapa
1 Replies
MKAF(1) 						      General Commands Manual							   MKAF(1)

NAME
mkaf - create a Performance Co-Pilot archive folio SYNOPSIS
$PCP_BINADM_DIR/mkaf [findopts] filename ... DESCRIPTION
A collection of one or more Performance Co-Pilot (see PCPIntro(1)) archive logs may be combined with mkaf to produce a PCP archive folio and the associated archive folio control file. Some PCP tools use mkaf to create archive folios, e.g. the ``record'' facility in the pmchart(1) and pmview(1) tools, to facilitate playback with pmafm(1). mkaf processes each filename argument, and if this is a component file from a PCP archive that archive is added to the folio. If filename is a directory, then this is searched recursively using find(1). Any filename argument beginning with a ``-'' is assumed to be a find(1) command line option (findopts); the default is -follow if no findopts are specified. The first named archive in the folio is assumed to be associated with the default host for any tool that tries to replay multiple archives from the folio. The folio control file is written to standard output, and has the following format. 1. The first line contains the word PCPFolio. 2. The second line contains the tag Version: followed by the format version number (currently 1). 3. For subsequent lines, blank lines and lines beginning with ``#'' are ignored. 4. The line beginning with the tag Created: documents where and when the folio was created. 5. The line beginning with the tag Creator: identifies the tool which created the folio (and is assumed to know how to replay the archive folio). If present, the second argument is the name of a configuration file that the creator tool could use to replay the archive folio, e.g. with the replay command for pmafm(1). In the case of mkaf (unlike pmchart(1) or pmview(1)) there is no knowledge of the contents of the archives, so the ``creator'' cannot replay the archive, however pmchart(1) is able to replay any archive, and so this tool is identified as the Creator: for archive folios created by mkaf(1). 6. This is then followed by one or more lines beginning with the tag Archive: followed by the hostname and base name of the archive. For example $ mkaf mydir/gonzo might produce the following folio control file. PCPFolio Version: 1 # use pmafm(1) to process this PCP archive folio # Created: on gonzo at Tue Jul 2 03:35:54 EST 1996 Creator: pmchart # Host Basename # Archive: gonzo mydir/gonzo/960627 Archive: gonzo mydir/gonzo/960628 Archive: gonzo mydir/gonzo/960629 Archive: gonzo mydir/gonzo/960630 Archive: gonzo mydir/gonzo/960701 Archive: gonzo mydir/gonzo/960701.00.10 Archive: gonzo mydir/gonzo/960701.05.25 Archive: gonzo mydir/gonzo/960702.00.10 PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
find(1), PCPIntro(1), pmafm(1), pmchart(1), pmview(1), pcp.conf(5) and pcp.env(5). DIAGNOSTICS
Some informational messages, warnings and pathological conditions are reported on standard error. Performance Co-Pilot PCP MKAF(1)
All times are GMT -4. The time now is 10:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy