Help with script or command to differentiate difference between two input file?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with script or command to differentiate difference between two input file?
Prev   Next
# 1  
Old 12-26-2010
Help with script or command to differentiate difference between two input file?

I got two file write now.
Input file 1:
Code:
>data_1
DSFDFDSGFDSGSGEGTRTRERPOYIORPGKKGDSPKFSDKFPSDKFSPFS
>data_34
WEEREREWREWOIQOPIEPDSKLFNDSFNSKNCASKJHDAFHAOUDFEOWWIOUFEWIUEWIRUEWIRUEWIORUEWOREWR
>data_21
ASDASDQWEQWRQERFWPOTGIUWEIPOFIOFDSNFKSJDNFSKDHFKDSJHFKDSJHF
>data_4
SDFDSFREREWPTIOEPOTIERWPOI
.
.

Input file 2:
Code:
>data_1
DSFDFDXXXXXXSGEGTRTRERPOYIORPGKKGDSPKFSDXXXXXXXXXXS
>data_34
WEEREREWREWOIQOPIEPDSKLFXXXXXXKNCASKJHDAFHAOUDFEOWWIOUFEWIUEWIRUEWIRUEWIORUEWOREWR
>data_21
ASDASDQWXXXXXXXXXXOTGIUWEIPOFIOFDSNFKSJDNFSKDHFKDSJHFKDSJHF
>data_4
SDFDSFREREWPTIOEPOTIEXXXXX
.
.

Desired output
Code:
      SGFDSG                            KFPSDKFSPFS

                        NDSFNS

        EQWRQERFWP

                    RWPOI
.
.

The word in BOLD is the difference part between input file 1 and input file 2.
I would like to export the word that only shown in input file 1 but not shown in input file 2 into another output file.
Thanks.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read input file with in awk script not through command line

Hi All, Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab. Cat my.awk #!/bin/awk -f function test(var){ some code} { } END { print"test code" } (5 Replies)
Discussion started by: random_thoughts
5 Replies

2. Shell Programming and Scripting

Difference between command line and script

i have a bit of a unique question. is there a way to know if a script is being run from from the command line or from another script? example: command line: ### ./autorun.sh ERROR: not permitted to run script from the commandline. exiting... but if i put "autorun.sh" into another... (4 Replies)
Discussion started by: SkySmart
4 Replies

3. Shell Programming and Scripting

how to differentiate file and directory name using ls command

how to differentiate file and directory name using ls command. l (3 Replies)
Discussion started by: jhon123
3 Replies

4. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

5. UNIX for Dummies Questions & Answers

Bash script to delete file input on command line

1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes? 2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
1 Replies

6. Shell Programming and Scripting

Need script to take input from file, match on it in file 2 and input data

All, I am trying to figure out a script to run in windows that will allow me to match on First column in file1 to 8th Column in File2 then Insert file1 column2 to file2 column4 then create a new file. File1: 12345 Sam 12346 Bob 12347 Bill File2:... (1 Reply)
Discussion started by: darkoth
1 Replies

7. UNIX for Dummies Questions & Answers

differentiate between a file and a device

sorry probably a beginner question but i was just wondering how unix does this as device are treated as files? (6 Replies)
Discussion started by: keith_hampson
6 Replies

8. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

9. UNIX for Dummies Questions & Answers

how to differentiate a file from a folder in a FIND?

I have to read a complete folder and if it is a file older that 7 days I have to copy it elsewhere and if it is a folder nothing to make. The way I do it: for I in `find /home/. -name "*" -mtime +7` do cp -Rf $I /home/elsewhere/. done Am I okay with the way I want to do it? Help... (3 Replies)
Discussion started by: denysQC
3 Replies

10. Shell Programming and Scripting

How to input username on text file into finger command on shell script

I'm trying to clean up my server and I have the list of some "special" users stored on the text file like this Now I want to write a shell script to finger all of them so I can have some kind of ideas who they are but here comes the problem....I completely forgot how to do it with shell... (3 Replies)
Discussion started by: Micz
3 Replies
Login or Register to Ask a Question