Sponsored Content
Top Forums Shell Programming and Scripting How to check number of group of file.? Post 302860981 by ken6503 on Monday 7th of October 2013 08:05:14 PM
Old 10-07-2013
How to check number of group of file.?

Hi Gurus,

I need check existing number of file based on the list in file list.
for example:
in my file list. I have below:

Code:
abc, file1.txt
abc, file2.txt
abc, file3.txt
abc, file4.txt
cde, filea1.txt
cde, filea2.txt
cde, filea3.txt
...

in my current file direcotry, I have file:
Code:
file1.20130502.txt
file2.20130502.txt
file3.20130502.txt
file4.20130502.txt
filea1.20130502.txt
filea2.20130502.txt

there 4 files for first group abc, after remove date partition (20130502) the files are completed, so, I need log into DB through sqlplus run query select count(*) from tab where group = 'abc', if count(*) > 0 then do nothing, if count(*) = 0 then call another script.
for group cde there is one file missing, I need send warning.

anybody can help me this?

Thanks in advance.

Last edited by ken6503; 10-07-2013 at 09:26 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to search string and number in one file and check in the other file

Hi, Can anyone help in the below problem. file1 has the below contents fileset 999 primary-ilist inode 37020 has invalid dotdot (426094) -> Not exist fileset 999 primary-ilist inode 115016 dup block ->... (9 Replies)
Discussion started by: knshree
9 Replies

2. UNIX for Advanced & Expert Users

retrieving all group names with a given group number

hi, which Unix/C function can i use to retrieve all group names with a particular group id? The following C code prints out the group id number of a particular group name: ------------------------------------------------------------------------ #include <stdio.h> #include <grp.h> int... (3 Replies)
Discussion started by: Andrewkl
3 Replies

3. Shell Programming and Scripting

check number or character of a file

Hi, Please see the below information. 1. Read files one by one and run the script. 2. Check if the filename is CHARTER OR NUMBER 3. Run the case statement. I have files in the folder. i will get 300 files in a single day. Abc_111111111111.csv 101010_kkk_bbbb.csv... (6 Replies)
Discussion started by: onesuri
6 Replies

4. UNIX Desktop Questions & Answers

Need to ftp some files, and check the number of rows in the transferd file

1)I need to write a script which ftps 3 files to a unix box, 2)once the files are ftped i need to check the number of rows in each file and compare it with the data (no of rows) coming in a manifest file, if the number of rows in each file matches the data coming in manifest file, then i need to... (3 Replies)
Discussion started by: imran_affu
3 Replies

5. Shell Programming and Scripting

need a one liner to grep a group info from /etc/group and use that result to search passwd file

/etc/group tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453 bin::2:root,daemon sys::3:root,bin,adm adm::4:root,daemon uucp::5:root /etc/passwd mk789:x:234:1::/export/home/dummy:/bin/sh po312:x:234:1::/export/home/dummy:/bin/sh ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies

6. Shell Programming and Scripting

To check for a number inside the file in UNIX

Hi Gurus I am a newbie to Unix programming and I am having a difficulty in finding out a number which is present in a file and storing it in a variable so that i can use it in my shell script. The content of the file "count" is: Count of the files=11 I need to just store the value 11 in... (8 Replies)
Discussion started by: vikramgk9
8 Replies

7. UNIX for Dummies Questions & Answers

Check group consistencies

hello masters , please help here. I have 4 cols, I am looking for consistent 'geno' values within 'line', 'part' combinations. If the geno values are not consistent within a 'line', 'part' block, then we delete that block. One of the complications is that geno values are always 2 character, but... (7 Replies)
Discussion started by: ritakadm
7 Replies

8. Shell Programming and Scripting

Script to check for a specific number of columns in a file

Hi All I have a file which has five columns in each rows. cat file.txt a|b|c|d|e 1|2|3|4|5 a1|a2|a3|a4|a5 . . . I need to make sure that there are no less than five or more than five columns (in all the rows) by mistake. I tried this : cat file.txt | awk 'BEGIN{FS="|"};{print... (3 Replies)
Discussion started by: chatwithsaurav
3 Replies

9. Shell Programming and Scripting

To check the missing file based on sequence number.

Hi All, I have a requirement that i need to list only the missing sequences with a unix script. For Example: Input: FILE_001.txt FILE_002.txt FILE_005.txt FILE_006.txt FILE_008.txt FILE_009.txt FILE_010.txt FILE_014.txt Output: FILE_003.txt FILE_004.txt FILE_007.txt FILE_011.txt... (5 Replies)
Discussion started by: Arun1992
5 Replies

10. UNIX for Beginners Questions & Answers

How to check when a group was removed for an id?

An id was a part of a particular user group. All of a sudden that id was removed from that group, because of which many things failed. How do I find out when/who modified the id settings? (2 Replies)
Discussion started by: ggayathri
2 Replies
ttk_image(n)							 Tk Themed Widget						      ttk_image(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk_image - Define an element based on an image SYNOPSIS
ttk::style element create name image imageSpec ?options? _________________________________________________________________ DESCRIPTION
The image element factory creates a new element in the current theme whose visual appearance is determined by Tk images. imageSpec is a list of one or more elements. The first element is the default image name. The rest of the list is a sequence of statespec / value pairs specifying other images to use when the element is in a particular state or combination of states. OPTIONS
Valid options are: -border padding padding is a list of up to four integers, specifying the left, top, right, and bottom borders, respectively. See IMAGE STRETCHING, below. -height height Specifies a minimum height for the element. If less than zero, the base image's height is used as a default. -padding padding Specifies the element's interior padding. Defaults to -border if not specified. -sticky spec Specifies how the image is placed within the final parcel. spec contains zero or more characters "n", "s", "w", or "e". -width width Specifies a minimum width for the element. If less than zero, the base image's width is used as a default. IMAGE STRETCHING
If the element's allocated parcel is larger than the image, the image will be placed in the parcel based on the -sticky option. If the image needs to stretch horizontally (i.e., -sticky ew) or vertically (-sticky ns), subregions of the image are replicated to fill the par- cel based on the -border option. The -border divides the image into 9 regions: four fixed corners, top and left edges (which may be tiled horizontally), left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions). EXAMPLE
set img1 [image create photo -file button.png] set img2 [image create photo -file button-pressed.png] set img3 [image create photo -file button-active.png] style element create Button.button image [list $img1 pressed $img2 active $img3] -border {2 4} -sticky we SEE ALSO
ttk::intro(n), ttk::style(n), ttk_vsapi(n), image(n), photo(n) KEYWORDS
style, theme, appearance, pixmap theme, image Tk 8.5 ttk_image(n)
All times are GMT -4. The time now is 08:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy