Sponsored Content
Top Forums Shell Programming and Scripting Record count checking for multiple files through for-loop Post 302903883 by victory on Friday 30th of May 2014 10:41:18 AM
Old 05-30-2014
THanks friend..

I tried it was working now...

Thanks a lot..could you please provide your email ID to contact..

---------- Post updated at 09:37 AM ---------- Previous update was at 08:55 AM ----------

Hi Friend,

I was not working for me when first file found data in file then it's getting exit and completed it's not going to check for another file.

let me check

---------- Post updated at 09:41 AM ---------- Previous update was at 09:37 AM ----------

Hi Rudy,

I have implemented the logic given below.


Code:
a=/tjx/iisNAS/data/edw/fp/output/common/sample.txt
b=/tjx/iisNAS/data/edw/fp/output/common/sample1.txt
for file in $a $b
do if [ 0 -eq $(wc -l /tjx/iisNAS/data/edw/fp/output/common/sample.txt) && 0 -eq $(wc -l /tjx/iisNAS/data/edw/fp/output/common/sample1.txt)] && 
   then mailx ...
        exit 1
   else mailx ...
        exit 0
   fi
done


Last edited by Franklin52; 05-30-2014 at 03:23 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replaying a record count with another record count

i use unix command to take the record count for a file1 awk 'END{print NR}' filename i already have a file2 which conatin the count like ... .. rec_cnt=100 .. .. I want to replace the record in the file2 using the record i take from file1. suggest me some simple ways of doing it... (2 Replies)
Discussion started by: er_zeeshan05
2 Replies

2. Shell Programming and Scripting

checking count of files and exiting

Hi All Please see the script below for file in ${filelist }; do if ]; then if ]; then print " $(date) STEP 6 ------- Copying $file to $destpath" fi if ! cp $ftppath/$file $destpath 2> /dev/null; then writeToLog "ERROR: ${0##*/} - $upartition Could not copy file $file" if ]; then... (1 Reply)
Discussion started by: king007
1 Replies

3. Shell Programming and Scripting

bash if loop for checking multiple parameters

Hello, I've got next problem: I want to examine at the beginning of a script in an if loop that: 1. Is there 4 parameters given 2. If first state is true then: is there switches -e and -d? 3. At the end, how can i indentify them as variebles regardlees to its order. I was thinking like... (2 Replies)
Discussion started by: szittyafergeteg
2 Replies

4. Shell Programming and Scripting

Comparison of record count of two files

Hi, I have one text file and zip file in UNIX directory.The Zip file contains another text file. For Ex: Text File Name = Req_file.txt Zip file Name= Response_file.txt_04072009_121548.gz Zip file contains one text file that name is Response_file.txt I want to compare the record... (1 Reply)
Discussion started by: praka
1 Replies

5. Shell Programming and Scripting

Checking the existance of multiple files

I am trying to execute the following command to check the existance of a file (which has a date timestamp on it). If there are more than one file, then also it should give me 'success' result. if then <do some work> else <no files> fi Since there are more than one... (18 Replies)
Discussion started by: vivek_damodaran
18 Replies

6. Shell Programming and Scripting

count of record in files

Hi all, I have written a scripts which count number of lines in all the files in a directory and write in a text file. I don't know how to format it while writing. OS suns solaris 10 my scripts is as below for i in /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/RIO_02-Aug-2012/ *.LOG do echo... (11 Replies)
Discussion started by: guddu_12
11 Replies

7. Programming

awk to count occurrence of strings and loop for multiple columns

Hi all, If i would like to process a file input as below: col1 col2 col3 ...col100 1 A C E A ... 3 D E G A 5 T T A A 6 D C A G how can i perform a for loop to count the occurences of letters in each column? (just like uniq -c ) in every column. on top of that, i would also like... (8 Replies)
Discussion started by: iling14
8 Replies

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

9. Shell Programming and Scripting

Checking File record equal to multiple of 70 or nearest number to multiple of 70

Hello, I have a file with below content - Example 3 6 69 139 210 345 395 418 490 492 I would like the result as - Multiple of 70 or nearest number in the file less than the multiple of 70 69 139 (5 Replies)
Discussion started by: Mannu2525
5 Replies

10. Shell Programming and Scripting

CSV joining and checking multiple files

Hello, For our work we use several scripts to gather/combine data for use in our webshop. Untill now we did not had any problems but since a couple days we noticed some mismatches between imports. It happened that several barcodes where matched even though it was a complete other product. Of... (19 Replies)
Discussion started by: SDohmen
19 Replies
GRUB-MKFONT(3)						     Library Functions Manual						    GRUB-MKFONT(3)

NAME
grub-mkfont -- Convert common font file formats into the PF2 format. SYNOPSIS
grub-mkfont [--ascii-bitmaps] [-a | --force-autohint] [-b | --bold] [-c | --asce=NUM] [-d | --desc=NUM] [-i | --index=NUM] [-n | --name=NAME] [--no-bitmap] [--no-hinting] <-o | --output=FILE> [-r | --range=FROM-TO[,FROM-TO]] [-s | --size=SIZE] [-v | --verbose] [--width-spec] FONT_FILES DESCRIPTION
grub-mkfont converts font files from common formats into the PF2 format used by GRUB. OPTIONS
--ascii-bitmaps Save only bitmaps for ASCII characters. --force-autohint Force generation of automatic hinting. --bold Convert font to bold. --asce=NUM Set font ascent to NUM. --desc=NUM Set font descent to NUM. --index=NUM Select face index NUM. --name=NAME Set font family to NAME. --no-bitmap Ignore bitmap strikes when loading. --no-hinting Disable hinting. --output=FILE Save ouptut to FILE. This argument is required. --range=FROM-TO,FROM-TO Set the font ranges to each pair of FROM,TO. --size=SIZE Set font size to SIZE. --verbose Print verbose messages. --width-spec Create a width summary file. FONT_FILES The input files to be converted. SEE ALSO
info grub Wed Feb 26 2014 GRUB-MKFONT(3)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy