Sponsored Content
Top Forums Shell Programming and Scripting Script to count files on daily basis Post 302949666 by fretagi on Tuesday 14th of July 2015 08:56:06 AM
Old 07-14-2015
yes:
Code:
#!/bin/ksh
ls -l | awk '
$6 != "Jul" || $7 != 13 || !($8 ~ /:/) { next }
/[.]cdr$/ { c++ }
/[.]tap$/ { t++ }
#END { printf(".cdr: %d\n.tap: %d\n", c, t) }'
END { printf(".cdr: %d\n.tap: %d\n", c, t) }' > file.tmp
if [ -s file.tmp ]
then
        mailx -s "count" name@domain.com <file.tmp
fi
rm file.tmp

 

9 More Discussions You Might Find Interesting

1. HP-UX

HPUX printers & plotters disable on a daily basis

HI all, I've been having issues with printers and plotters disabling with no reason at all...It could happen to the same workstation once a day or once a week..There is nothing consistant..I stop and restart the spooler, only then can I re-enable the disabled printer.... If anyone is... (0 Replies)
Discussion started by: Shutdown
0 Replies

2. Shell Programming and Scripting

Zip all the files within a directory on a daily basis

I need to zip all the files within a directory on a daily basis and store them as a zip file within that directory with the date in its naming convention I have file extentions .log .lst and .out's within that directory How do i do this task zip -mqj mydir/allzip$YYMMDDDD.zip mydir/*.* ... (5 Replies)
Discussion started by: ramky79
5 Replies

3. Shell Programming and Scripting

Count first column on the basis of two other columns

Hello, I have a file ================= 12 SRV1 GRP1 19 SRV1 GRP1 19 SRV1 GRP2 3 SRV1 GRP1 3 SRV1 GRP2 30 SRV1 GRP2 7 SRV1 GRP1 8 SRV1 GRP3 =========== I want output like =============== 41 SRV1 GRP1 52 SRV1 GRP2 8 SRV1 GRP3 (1 Reply)
Discussion started by: kaustubh137
1 Replies

4. Shell Programming and Scripting

Moving files on first in first out basis

suppose in a directory there are over 20 files. I need to move the first 10 files(first in first out basis, which ever files comes first) into a separate directory. i have an idea but not sure how far this is correct, can anyone guide me on this? find /opt/logs -name "cor*" -mtime 2... (6 Replies)
Discussion started by: venkatesht
6 Replies

5. Shell Programming and Scripting

Creating directory daily basis...

Need help on this script. the month is not changing to February... #!/bin/bash for X in `seq 1 100` do DATE=`date +%Y-%m-%d "--date=${X} day ago"` Y=`date +%Y` M=`date +%m` D=`date +%d "--date=${X} day ago"` DIR=/home/LogBackup for i in `seq 1 ` do if ;then # ... (1 Reply)
Discussion started by: alelee
1 Replies

6. UNIX for Dummies Questions & Answers

Tracking the script(.sh) files triggered on daily or monthly basis from source

Hi Gurus, Is there any solution for tracking the script(.sh) files triggered on daily or monthly basis from source - Datastage (Routines) Needs to find out if this scripts are running on daily just want to know that is there anything to track Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies

7. Shell Programming and Scripting

Script to move file on a daily basis

Hi! Please I need help on the a script that would pick one file in a directory, change its name, them change its permissions, them move to a different directory, but has to be done on a daily basis, and the file that is being moved to its final destination has to have the following format:... (7 Replies)
Discussion started by: fretagi
7 Replies

8. Shell Programming and Scripting

Error files count while coping files from source to destination locaton as well count success full

hi All, Any one answer my requirement. I have source location src_dir="/home/oracle/arun/IRMS-CM" My Target location dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct" my source text files check with below example.text file content $fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies

9. Shell Programming and Scripting

Shell script for field wise record count for different Files .csv files

Hi, Very good wishes to all! Please help to provide the shell script for generating the record counts in filed wise from the .csv file My question: Source file: Field1 Field2 Field3 abc 12f sLm 1234 hjd 12d Hyd 34 Chn My target file should generate the .csv file with the... (14 Replies)
Discussion started by: Kirands
14 Replies
mlib_SignalReSampleFIRInit_S16_S16(3MLIB)		    mediaLib Library Functions			 mlib_SignalReSampleFIRInit_S16_S16(3MLIB)

NAME
mlib_SignalReSampleFIRInit_S16_S16, mlib_SignalReSampleFIRInit_S16S_S16S, mlib_SignalReSampleFIRInit_F32_F32, mlib_SignalReSample- FIRInit_F32S_F32S - initialization for resampling with filtering SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalReSampleFIRInit_S16_S16(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_S16S_S16S(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_F32_F32(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_F32S_F32S(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); DESCRIPTION
Each of these functions allocates memory for the internal state structure and converts the parameters into an internal representation for rational sample rate conversion with FIR filtering between upsampling and downsampling. PARAMETERS
Each of the functions takes the following arguments: state Internal state structure. flt Filter coefficient array, two-channel interleaved in the cases of stereo. tap Taps of the filter. ufactor Factor by which to upsample. uphase Phase in upsampling. 0 <= uphase < ufactor. dfactor Factor by which to downsample. dphase Phase in downsampling. 0 <= dphase < dfactor. RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalReSampleFIR_S16_S16_Sat(3MLIB), mlib_SignalReSampleFIR_F32_F32(3MLIB), mlib_SignalReSampleFIRFree_S16_S16(3MLIB), mlib_SignalRe- SampleFIRFree_F32_F32(3MLIB), attributes(5) SunOS 5.10 9 Nov 2004 mlib_SignalReSampleFIRInit_S16_S16(3MLIB)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy