08-22-2016
Concatenation of different reports dynamically
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"
"Report.Dddmmyy.Thhmiss.DDDD"
2. At the end of the day I need to concatenate all reports with similar names into a single file.
For example: 24 files for pattern "Report.Dddmmyy.Thhmiss.CTLR" into a single file called "Test.dat" and so on.
3.Please note that the last four letters of the file name will be a constant and the reports have to be concatenated using this.
4. I do not want to parameterize just these last four letters or list the last four letter as ls -l *CTLR* as this will be hard coding so could there be a better way of handling this!?
Kindly advise.
Thanks,
Jess
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to implement cron job. Ex: I need to run SQR reports dynamically by using cron job. How can I implement cron job in shell.. If any one is having sample script in any shell that would be great help to me.
Thanks
Siva (1 Reply)
Discussion started by: siva
1 Replies
2. Shell Programming and Scripting
What is syntax for String concatenation?
I have $1 as directory.
$var is some variable value
'/' String value.
How do I have to concatenate if I have to run utility -
util $1 followed by '/' followed by $var
There is no space between these three. (2 Replies)
Discussion started by: videsh77
2 Replies
3. UNIX for Dummies Questions & Answers
my input file contains thousands of lines like below
234A dept of education
9788 dept of commerce
8677 dept of engineering
How do i add a delimeter ':' after FIRST 4 CHARACTERS in a line
234A:dept of education
9788:dept of commerce
8677:dept of engineering (7 Replies)
Discussion started by: systemsb
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I want to write a generic shell script, which can concatenate n number of files passed as parameter ;to an output file which is again a parameter
Example
catfl.sh outfl.txt a.txt b.txt c.txt (3 files to be concatenated into a file outfl.txt)
catfl.sh outfl.txt a.txt b.txt(2 files to be... (3 Replies)
Discussion started by: samit_9999
3 Replies
5. Shell Programming and Scripting
How can I do this:
date = 4 -----------> 04
Month= 3-----------> 03
I wish to make a varibale named Var1 which will hold the value of current date and month value as:
2 digits for date.
2 digits for month.
So finally var1 should hold value as 0403 --- MMDD (11 Replies)
Discussion started by: Asteroid
11 Replies
6. Shell Programming and Scripting
Hi,
I have two files.
cat file.txt
a
b
c
d
cat file1.txt
j
k
l
m
I need the output as
a:j (12 Replies)
Discussion started by: nareshkumar522
12 Replies
7. Shell Programming and Scripting
please help me on this....
cat /xx.txt
2:1
2
2:2
24
8:0
0
9:0
0
Expected result would be
2:1 2
2:2 24
8:0 0
9:0 0 (4 Replies)
Discussion started by: Aditya.Gurgaon
4 Replies
8. Shell Programming and Scripting
Hi,
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt... (8 Replies)
Discussion started by: TomG
8 Replies
9. Shell Programming and Scripting
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
10. Shell Programming and Scripting
Since my last threads were closed on account of spamming, keeping just this one opened!
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names
"Report.Dddmmyy.Thhmiss.CTLR"... (5 Replies)
Discussion started by: Jesshelle David
5 Replies
df_vxfs(1M) df_vxfs(1M)
NAME
df_vxfs: df - report number of free disk blocks on a VxFS file system
SYNOPSIS
[special|directory]...
DESCRIPTION
prints the number of free blocks and free inodes in VxFS file systems or directories based on the counts kept in the super-blocks.
VxFS dynamically allocates inodes from a pool of free blocks. The number of free inodes and blocks reported by is an estimate based on the
number of free 8K or larger extents and the current ratio of allocated inodes to allocated blocks. (Extents smaller than 8K may not be
usable for all types of allocation, so does not count free blocks in extents smaller than 8K.) Allocating additional blocks may therefore
decrease the count of free inodes and vice versa.
If the operand to is a special device name, the file system can be an unmounted or mounted file system (for example, If you specify a
directoryname, displays information for the file system at that mount point. If neither special nor directory is specified, the free space
on all of the mounted file systems is printed.
Options
recognizes the following options:
Report only the number of kilobytes free.
Report the number of files free.
Report only an actual count of the blocks in the free list
(free inodes are not reported). When this option is specified, reports on raw devices.
Specify the file system type
Report the entire
statvfs(2) structure.
Report the total number of inodes, the number of free inodes, number of used inodes
and the percentage of inodes in use.
Report the allocation in kilobytes.
Report on local file systems only.
Report the file system name. If invoked with no other options this
option prints a list of mounted file system types.
Print the number of free extents of each size.
Free extents are always an integral power of two in length, ranging from a minimum of one block to the maximum extent
size supported by the file system.
Report the total allocated block figures and the number of free blocks.
Report the percentage of blocks used, the number of blocks used and the number
of blocks free. This option cannot be used with other options.
Echo the completed command line, but performs no other action.
The command line is generated by incorporating the user-specified options and other information derived from This
option allows the user to verify the command line.
There are a number of options that specify output formats, some combinations of which are incompatible. If an incompatible combination is
specified, one of the options will override the other(s).
Operands
recognizes the following operands:
directory Name of the mount point from which the VxFS file system is accessed.
special Device name, which contains a mounted or unmounted VxFS file system.
EXAMPLES
Report the number of free disk blocks for all mounted file systems:
Report the number of free extents of each size, for all mounted VxFS file systems:
Report the number of free files for all mounted VxFS file systems:
Report the total allocated block figures and the number of free blocks, for all mounted file systems:
Report the total allocated block figures and the number of free blocks, for the file system mounted as
FILES
File-system devices.
File-system devices.
Static information about the file systems.
mounted-file-system table.
SEE ALSO
du(1), df(1M), fsck_vxfs(1M), statvfs(2), fs_vxfs(4), mnttab(4).
STANDARDS CONFORMANCE
: SVID2, XPG2, XPG3
df_vxfs(1M)