I need a KSH script that will check a host file for duplicate IP's and/or host names and report out the errors. Anyone out there have one they would like to share?
Something like:
Hostname blahblah appears X times
IP Address xxx.xxx.xxx.xxx appears X times
TIA (4 Replies)
Hi,
In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'.
In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Hello experts,
I have a requirement where I have to implement two checks on a csv file:
1. Check to see if the value in first column is duplicate, if any value is duplicate script should exit.
2. Check to verify if the value at second column is between "yes" or "no", if it is anything else... (4 Replies)
Hi all,
I have created 3 arrays which can have common elements in each like-
arr_a contains str1 str2 str3 str4 str5
arr_b contains str3 str6 str7 str1 str8
arr_c contains str4 str9 str10 str2
each array is created with "set -A arr_name values" command. I want to create a resultant array-say... (1 Reply)
Hi everyone, :)
I'm trying to make a simple C program that scans an array of chars to see if its elements are similar.
I can't understand what's wrong. Could you help me to fix this? Here is the code.
Thanks!
#include<stdio.h>
int main() {
int arr;
int i, len;
int flag =... (10 Replies)
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
I have a code which is using to find duplicates in a files based on column.Below is the same code which is used to find duplicates in my file based on column 1
awk -F'|' '{if (x) { x_count++; print $0; if (x_count == 1) { print x } } x = $0}' FileName >Dup_File.txt
But my requirement here is... (3 Replies)
Hi,
In an ideal scenario, I will have a listing of db transaction log that gets copied to a DR site and if I have them all, they will be numbered consecutively like below.
1_79811_01234567.arc
1_79812_01234567.arc
1_79813_01234567.arc
1_79814_01234567.arc
1_79815_01234567.arc... (3 Replies)
Hi,
There are duplicate entries in file, but uniq will not see because first field is different. How will I catch all lines, which are having duplicate IPs ?
bash-2.05# cat db.file | grep 172.30.133.11
dsrq-ctrl1-prod A 172.30.133.11
e911q-db1-nxge0 A 172.30.133.11... (4 Replies)
Discussion started by: solaris_1977
4 Replies
LEARN ABOUT DEBIAN
grid-mapfile-check-consistency
GRID-MAPFILE-CHECK(8) Globus Commands GRID-MAPFILE-CHECK(8)NAME
grid-mapfile-check-consistency - Add an entry to a grid map file
SYNOPSIS
grid-mapfile-check-consistency [-h] [-help] [-usage] [-version]
grid-mapfile-check-consistency [-mapfile MAPFILE] | [-f MAPFILE]
DESCRIPTION
The grid-mapfile-check-consistency program performs basic checks for validity of a gridmap file. These checks include checks for existence,
duplication of entries, and valid local user names. If the gridmap file is valid, grid-mapfile-check-consistency exits with a zero exit
code, otherwise it exits with a non-zero exit code. In either case, it displays information about its progress as it parses and validates
the gridmap file.
By default, grid-mapfile-check-consistency will check the gridmap file named by the GRIDMAP environment variable if present. If that
variable is not set, it will check the file $HOME/.gridmap for non-root users if present. If that doesn't exist or
grid-mapfile-check-consistency is run as root, it will then check /etc/grid-security/grid-mapfile. This can be changed by the use of the
-mapfile or -f command-line options.
The full set of command-line options to grid-mapfile-check-consistency are:
-help, -h, -usage
Display the command-line options to grid-mapfile-check-consistency.
-version
Display the version number of the grid-mapfile-check-consistency command.
-mapfile MAPFILE, -f MAPFILE
Check the gridmap file named by MAPFILE instead of the default.
EXAMPLES
Check that the gridmap file in /etc/grid-security is valid:
% grid-mapfile-check-consistency -f /etc/grid-security/grid-mapfile
Checking /etc/grid-security/grid-mapfile
Verifying grid mapfile existence...OK
Checking for duplicate entries...OK
Checking for valid user names...OK
Check a gridmap file that has an invalid local user name:
% grid-mapfile-check-consistency -f /etc/grid-security/grid-mapfile
Checking /etc/grid-security/grid-mapfile
Verifying grid mapfile existence...OK
Checking for duplicate entries...OK
ERROR: baduser is not a valid local username
ERROR: Found 1 invalid username(s)
ENVIRONMENT VARIABLES
The following environment variables affect the execution of grid-mapfile-check-consistency:
GRIDMAP
Path to the default gridmap to check.
FILES
The following files affect the execution of grid-mapfile-check-consistency:
$HOME/.gridmap
Path to the default gridmap to check if the GRIDMAP environment variable is not set for non-root users.
/etc/grid-security/grid-mapfile
Path to the default gridmap to check if GRIDMAP environment variable is not set and the above file does not exist.
SEE ALSO grid-mapfile-add-entry(8), grid-mapfile-delete-entry(8)AUTHOR
University of Chicago
Globus Toolkit 5.0.1 03/19/2010 GRID-MAPFILE-CHECK(8)