Sponsored Content
Full Discussion: Unix Doubt
Top Forums UNIX for Advanced & Expert Users Unix Doubt Post 302144212 by abhishek3598 on Tuesday 6th of November 2007 05:42:10 PM
Old 11-06-2007
Comparing two files..

Hi Guys,

Requirement;

Want to compare two files, if the the content of both files is same then show "Good result" else Show "Bad Result"

I am using the following logic


if( cmp -s a b = 0 )

then
echo "Good result"
else echo "Bad result"
exit 0
fi


But this is not working.

FYI, the content of file is as shown below

for file a

0 TOTALS 8,325 17,887,904 13,907 163,243,465 1,306,821,707 10.9 %

For file b


0 TOTALS 8,325 10,000,904 13,907 163,243,465 1,306,821,707 10.9 %

Since the 4th values in b is differnt so that output of If statement should be "Bad result"


It will be really great if someone can help me out with this.

Thanks,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix + oracle doubt....involving shell script

....does the dbms_output.put_line work inside unix shell script? i mean this is to be inside the sqlplus connection as follows!! sqlplus -s $UP <<EOJ .. .. .. dbms_output.put_line ('Insertion procedure failed for UPC BC : ' || wk_key_value || ' Sqlcode: ' || SQLCODE || ' Error... (2 Replies)
Discussion started by: mexx_freedom
2 Replies

2. UNIX for Advanced & Expert Users

doubt regarding user password expiry in unix

I want to know the command through which we can know the expiry date of the password. I tried chage but it is not working on my system please provide necessary information I am not using root I need info on user level (2 Replies)
Discussion started by: irshad
2 Replies

3. Shell Programming and Scripting

Doubt on Executing unix commands in script

How can I execute the unix command "cd - Change directory" command, so that my command prompt should be reflected for that change. Example : Now you are in your home directory i.e /home/naresh and you have some sub directory called unixinfo in your home directory. i want to write a script,so... (2 Replies)
Discussion started by: Naresh Kumar
2 Replies

4. UNIX for Dummies Questions & Answers

Sending a mail from unix script doubt

HI i usually send an a file attachment in a mail from unix like following. mailx -s 'Job Success' someoner@gmail.com < attachment.log But I have observed in several threads that we can also use uuencode and uudecode. What are they? when should we use uudecode and uuencode ... (1 Reply)
Discussion started by: rajesh_tns
1 Replies

5. UNIX for Dummies Questions & Answers

Doubt in Oracle connecting unix - Very urgent

I am using a oracle query from unix.. flag=`sqlplus -s <<EOF SELECT 'Y' FROM table_name WHERE cond1 = '${table_name}' AND DECODE('${var_a}','''NA''',own,'${var_b0}')= own exception when no_data_found then dbms_output.put_line(NVL(l_owner_flag,'X')); end; EOF` Its not validating the... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies

6. UNIX for Dummies Questions & Answers

A little doubt regarding setgid and Unix access right flags.

Hi all! I have a folder with permissions 2770 (SETGID) drwxrws--- 2 loguser admins 5 Mar 17 11:11 mydir Inside that folder there are some files with permissions 0640: -rw-r----- 1 loguser admins 0 Mar 17 11:11 monday.log -rw-r----- 1 loguser admins ... (2 Replies)
Discussion started by: verdepollo
2 Replies

7. Shell Programming and Scripting

Doubt

Hi, I have a file with multiple entries and I have calculated the percentages. Now I want to know how many of my entries are there between 1-10% 11-20% and so on.. chr1_14401_14450 0.211954217888936 chr1_14451_14500 1.90758796100042 chr1_14501_14550 4.02713013988978... (1 Reply)
Discussion started by: Diya123
1 Replies

8. UNIX for Dummies Questions & Answers

Doubt in Unix ??

Is it possible to create unix or linux commands ? if it is then how to create ?:) (1 Reply)
Discussion started by: Santhosh Raju
1 Replies

9. Shell Programming and Scripting

Basic doubt in UNIX

Hi, I'm new to this and very much interested to learn unix. Can any one explain me the symbols y we use this is scripting(~ and $). It would be great if some one explain with the eg. Thanks Naveen A (2 Replies)
Discussion started by: Pranaveen
2 Replies

10. UNIX for Beginners Questions & Answers

Doubt

in my shell script requirement is to search and replace the file with variable so i use the following command sed -i "s/abc/$SCHEMA/g" table.sql later when the script runs sqlplus username/pwd@Table& this & is not letting the variable to replace the value inside the file .please let me know... (1 Reply)
Discussion started by: bhuvan1
1 Replies
vrnotify(1M)															      vrnotify(1M)

NAME
vrnotify - display Veritas Volume Replicator (VVR) events SYNOPSIS
vrnotify [-g diskgroup] [-n number] [-t timeout] [rvg1 rvg2...] DESCRIPTION
The vrnotify utility displays events related to Veritas Volume Replicator (VVR) as managed by the Volume Replicator administrative daemon, vradmind. The vrnotify command is a VVR-specific utility and requires a valid VVR license. A Replicated Data Set (RDS) is comprised of a Replicated Volume Group (RVG) on the Primary host and its counterparts on the Secondary hosts. Note: An RDS is a concept used in vradmin; it is not a VVR object. The vradmind daemon distributes VVR related events to Primary and Secondary hosts in the RDS. The vrnotify command displays events for one or more RDS. The rvg argument is the name of a replicated volume group (RVG) on the local host that specifies the RDS on the local host. rvg determines a default local disk group, according to the standard disk group selection rules described in vxintro(1M). You can specify a specific local disk group using the -g diskgroup option. The vrnotify command displays each event on a new line using the following format: host-name:event-type:rds-name:Event Message The following event types may be displayed: o resync_started o resync_stopped o resync_paused o lat_throttle_on o lat_throttle_off o lat_throttle_override o lat_throttle_fail o srlprot_throttle_on o srlprot_throttle_off o srlprot_override o srlprot_fail o srl_overflow o srlprot_dcm_on o srlprot_dcm_off o rlk_connect o rlk_disconnect o srl_log_warn OPTIONS
-g diskgroup Specifies the disk group for the operation, either by disk group ID or by disk group name. By default, the disk group is chosen based on the RDS rvg (if any). -n number Displays the indicated number of events, then exits. -t timeout Displays events for up to timeout seconds, then exits. The -n and -t options can be combined to specify a maximum number of events and a maximum timeout to wait before exiting. FILES
/var/vx/vras/log Directory containing log files for vradmind server. EXIT CODES
The vrnotify utility exits with a status of 1 if the attempted operation fails. This exit code is the same for all problems. SEE ALSO
vradmin(1M) VxVM 5.0.31.1 24 Mar 2008 vrnotify(1M)
All times are GMT -4. The time now is 02:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy