Sponsored Content
Top Forums Shell Programming and Scripting Search and compare files from two paths Post 302790551 by DGPickett on Friday 5th of April 2013 04:18:15 PM
Old 04-05-2013
Does sdiff recurse like diff, for dirs ( sdiff -bw head1 head2 )?

Consider something very readable but not sdiff, like: diff -bwU99999 head1 head2

Last edited by DGPickett; 04-05-2013 at 05:25 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to search & compare paragraphs between two files

Hello Guys, Greetings to All. I am stuck in my work here today while trying to comapre paragraphs between two files, I need your help on urgent basis, without your inputs I can not proceed. Kindly find some time to answer my question, I'll be grateful to you for ever. My detailed issue is as... (10 Replies)
Discussion started by: NARESH1302
10 Replies

2. UNIX Desktop Questions & Answers

how to display paths of files in a directory

hi guys does anyone know how to display the file paths of the files stored within a directory at the command terminal? e.g. if i have a directory called "home", how do i display the file paths of the files inside the directory? cheers (2 Replies)
Discussion started by: Villaman69
2 Replies

3. HP-UX

Search environment variables for paths

Hi, I am using the HP machine at the moment and by default I have been setup with the kron shell i.e. my home profile is .kshrc I would like to access a program anywhere on the system so I have added a path and created an environment variable like this: export myvarpath=/a/abc/def/ghij... (3 Replies)
Discussion started by: cyberfrog
3 Replies

4. Shell Programming and Scripting

compare two files and search keyword and print output

You have two files to compare by searching keyword from one file into another file File A 23 >pp_ANSWER 24 >aa hello 25 >jau head wear 66 >jss oops 872 >aqq olps ploww oww sss 722 >GG_KILLER ..... large files File B Beta done KILLER John Mayor calix meyers ... (5 Replies)
Discussion started by: cdfd123
5 Replies

5. Shell Programming and Scripting

Search compare and determine duplicate files

Hi May i ask if someone know a package that will search a directory recursively and compare determine duplicate files according to each filename, date modified or any attributes that will determine its duplicity If none where should i start or what are those command in shell scripting that... (11 Replies)
Discussion started by: jao_madn
11 Replies

6. UNIX for Dummies Questions & Answers

Determining file size for a list of files with paths

Hello, I have a flat file with a list of files with the path to the file and I am attempting to calculate the filesize for each one; however xargs isn't playing nicely and I am sure there is probably a better way of doing this. What I envisioned is this: cat filename|xargs -i ls -l {} |awk... (4 Replies)
Discussion started by: joe8mofo
4 Replies

7. Shell Programming and Scripting

Replace directory paths in multiple files at once

I need to update about 2400 files in a directory subtree, with a new directory path inside the files I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2 with this: /u01/PROD/apps/apps_st/10.1.3 I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies

8. UNIX Desktop Questions & Answers

Change name of files to their paths -- find loop

Dear All, I have many sub-folders but each of them have a file with same name but different data. I want to either move or copy them into a new folder but they need to have the path of where they are coming as part of their name... I have managed to find the files but dont know how to change... (2 Replies)
Discussion started by: A-V
2 Replies

9. UNIX for Dummies Questions & Answers

Search for string in a file then compare it with excel files entry

All, i have a file text.log: cover6 cover3 cover2 cover4 other file is abc.log as : 0 0 1 0 Then I have a excel file result.xls that contains: Name Path Pass cover2 cover3 cover6 cover4 (1 Reply)
Discussion started by: Anamika08
1 Replies

10. Shell Programming and Scripting

Script for linking files with paths in 2 text files

I have 2 txt files, 1.txt and 2.txt which contain the paths to files that need to be linked. Example 1.txt: /root/001/folder2/image4.nii.gz /root/002/folder2/image4.nii.gz Example 2.txt: /root/001/folder2/image5.nii.gz /root/002/folder2/image5.nii.gz Each line represents images from... (7 Replies)
Discussion started by: LeftoverStew
7 Replies
sdiff(1)							   User Commands							  sdiff(1)

NAME
sdiff - print differences between two files side-by-side SYNOPSIS
sdiff [-l] [-s] [-o output] [-w n] filename1 filename2 DESCRIPTION
sdiff uses the output of the diff command to produce a side-by-side listing of two files indicating lines that are different. Lines of the two files are printed with a blank gutter between them if the lines are identical, a < in the gutter if the line appears only in filename1, a > in the gutter if the line appears only in filename2, and a | for lines that are different. (See the EXAMPLES section below.) OPTIONS
-l Print only the left side of any lines that are identical.to -s Do not print identical lines. -o output Use the argument output as the name of a third file that is created as a user-controlled merge of filename1 and filename2. Identical lines of filename1 and filename2 are copied to output. Sets of differences, as produced by diff, are printed; where a set of differences share a common gutter character. After printing each set of differences, sdiff prompts the user with a % and waits for one of the following user-typed commands: l Append the left column to the output file. r Append the right column to the output file. s Turn on silent mode; do not print identical lines. v Turn off silent mode. e l Call the editor with the left column. e r Call the editor with the right column. e b Call the editor with the concatenation of left and right. e Call the editor with a zero length file. q Exit from the program. On exit from the editor, the resulting file is concatenated to the end of the output file. -w n Use the argument n as the width of the output line. The default line length is 130 characters. USAGE
See largefile(5) for the description of the behavior of sdiff when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). EXAMPLES
Example 1 An example of the sdiff command. A sample output of sdiff follows. x | y a a b < c < d d > c ENVIRONMENT VARIABLES
If any of the LC_* variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of sdiff for each corresponding locale category is determined by the value of the LANG environ- ment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_* variables. If none of the above vari- ables is set in the environment, the "C" locale determines how sdiff behaves. LC_CTYPE Determines how sdiff handles characters. When LC_CTYPE is set to a valid value, sdiff can display and handle text and file- names containing valid characters for that locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |Availability SUNWesu | |CSI Enabled | +-----------------------------------------------------------+ SEE ALSO
diff(1), ed(1), attributes(5), environ(5), largefile(5) SunOS 5.11 20 Dec 1996 sdiff(1)
All times are GMT -4. The time now is 10:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy