Sponsored Content
Top Forums Shell Programming and Scripting verifying existence of multiple files Post 302148270 by ammu on Friday 30th of November 2007 02:24:15 PM
Old 11-30-2007
Thank you Smilie

It is working
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check for FILES existence

hi, I have a list of filenames and I want to verify if they all exist. I know "if filename" would do the trick but how do I go about a list of files? thanks (3 Replies)
Discussion started by: mpang_
3 Replies

2. Shell Programming and Scripting

Checking Multiple file existence

Hi, I want to check multiple files exist or not in a single if statement in korn Shell:confused:. Please help me Thanks (1 Reply)
Discussion started by: lathish
1 Replies

3. UNIX for Dummies Questions & Answers

Tests for existence of files/directories

Hi, - The first question I have concerns a very fundamental aspect of a unix OS. Specifically, does unix treat everything as a file (ie a directory is just a type of file)? - The reason I ask is that I am trying to determine which BASH unary operator I would to use to determine whether or not... (1 Reply)
Discussion started by: msb65
1 Replies

4. Shell Programming and Scripting

Script needed to wait for existence of multiple files

Hi Forum. I need a script to wait for all multiple trigger files to be present or else go to sleep for 10 seconds (Number of trigger files can vary). I tried to search on the forum but was not able to find a solution. I found this code on this forum but it's not working as expected: for... (6 Replies)
Discussion started by: pchang
6 Replies

5. Shell Programming and Scripting

Test for existence of files

Hello, Can you please help me to see if log files exist in a directory? I need to scan logs in different directories, so I am using an array to change dynamically. I need help in the if test statement dir=/logs/MSD dir=/logs/UPD countA=1 while (( countA <= ${#dir } )) do cd ${dir}... (1 Reply)
Discussion started by: drbiloukos
1 Replies

6. Shell Programming and Scripting

replace multiple existence of : symbol with one

Infile Outfile (3 Replies)
Discussion started by: dvah
3 Replies

7. Shell Programming and Scripting

test for existence of files with same extension

Hi, I am checking for existence of files with the same extensions #! /usr/bin/ksh txtfiles = '*.txt' if then cp ${dirpath}/${txtfiles} ${dir2path} fi I am getting the following error line 5: [: too many arguments for the if check condition (4 Replies)
Discussion started by: chen.sara
4 Replies

8. Shell Programming and Scripting

check existence of files in a folder

Hi I am having a problem to verify existence of files. I need to know whether or not files in a folder that begins with a name. For example all files that start with The_File_ *. I was doing it this way, but gives me error. if text -f /work/The_File_* then ... else .. fi (5 Replies)
Discussion started by: Rodrih92
5 Replies

9. Shell Programming and Scripting

Check for the existence and add them from 2 different files

Hi, I have two files file1: ALEX DANY GARY TOM MARY HARRIS file2: ALEX 3 ALEX 5 ALEX 0 ALEX 1 ALEX 0 DANY 2 (2 Replies)
Discussion started by: Diya123
2 Replies

10. Shell Programming and Scripting

Check the Files existence

Hi I have a requirement to check whether the files exists, then it will call other steps in shell script. I did ls *.csv|wc -l if then checking the count of the files should be more than 1 then it will call other steps. I am getting the error that too many arguements as there n... (13 Replies)
Discussion started by: cnrj
13 Replies
pwck(8) 						      System Manager's Manual							   pwck(8)

NAME
pwck, grpck - Checks the password and group files for inconsistencies SYNOPSIS
pwck [-admNs] [file] grpck [-mNp] [file] FLAGS
Causes both pwck and grpck to additionally check the NIS database entries using the same consistency tests. Users that are defined in the local password or group file without the "+" at the start of the name field are flagged as duplicate entries. pwck Inhibits the running of the /tcb/bin/authck -p command on a system running Enhanced Security. Prevents pwck from checking for the presence of the user's login directory. Directs pwck to check for mixed case usernames. Causes pwck to check for the presence of the optional shell field for each entry. grck If there are no members, causes grpck to display a message indicating the listed group has no members. Directs grpck to not check for a users' existence in the password database (local or NIS). DESCRIPTION
The pwck command scans the /etc/passwd file, or the named file, and writes to standard out any inconsistencies. The scan checks the number of fields, login name, user ID, group ID, and existence of a login directory and optional program name. The grpck command scans the /etc/group file, or the named file, and writes to standard out any inconsistencies. The scan checks the number of fields, group name, group ID, and whether all login names appear in the password file. EXAMPLES
To verify the password information in the /etc/passwd file for consistency, enter: pwck To verify the password information in the /etc/passwd file and the NIS database for consistency without checking each users login directory validity, enter: pwck -Nd To verify the group information in the /etc/group file and the NIS database for consistency, enter: grpck -N FILES
Specifies the command path Specifies the command path Contains user information Contains group information RELATED INFORMATION
Commands: adduser(8), authck(8), groups(1), passwd(1), vipw(8) Files: passwd(4), group(4), ypfiles(4) delim off pwck(8)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy