Sponsored Content
Full Discussion: diff result makes no sense
Top Forums Shell Programming and Scripting diff result makes no sense Post 302357130 by Blackbox on Monday 28th of September 2009 09:26:08 PM
Old 09-28-2009
Java diff result makes no sense

Hi,

I have written a small shellscript
Imagine dbalt.txt already existed...
"
....
Code:
touch report.txt
lynx -dump "http://site.com/index.htm" > site1.txt
lynx -dump "http://site.com/index2.htm" > site2.txt
grep -E 'Nummer: |EUR' site1.txt > preis1.txt
grep -E 'Nummer: |EUR' site2.txt > preis2.txt
cat preis2.txt >> preis1.txt
cut -d: -f2 preis1.txt > db.txt
rm preis2.txt
rm preis1.txt
rm site1.txt
rm site2.txt
rm report.txt
diff  -i dbalt.txt db.txt > report.txt

rm dbalt.txt
mv db.txt dbalt.txt

"
Although the content of the 2 textfiles db.txt and dbalt.txt
didn't changed, the result of diff is like this one:

"
57,58d56
< 1661434
< EUR8.691,-
60a59,60
> 1661434
> EUR8.691,-
92a93,96
> 1652633
> EUR5.990,-
> 1592748
> EUR6.501,-
95,96d98
< 1538084
< EUR6.401,-
99,100d100
< 1652633
< EUR5.990,-
"

What the H.... should I do?

mfg,
Blackbox
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ls -R and then diff on those result

Hi, I have two similar directory structures. One is the latest dev environment and the other is a previous version of the same dev environment. I need to do a diff on the .cpp .c .java and .h files. Hence I need a list of all the files of the above pattern so that I can diff then... (3 Replies)
Discussion started by: vino
3 Replies

2. Linux Benchmarks

Linux Benchmarks Makes No Sense

I created two computers with identical hardware, and run the benchmark programs in both starting at the same exact time. What makes no sense is that the computer that has the lower average index (121) finished the race a good 30 minutes ahead of the computer wich showed the higher avg index... (0 Replies)
Discussion started by: philip_38
0 Replies

3. UNIX for Dummies Questions & Answers

Simple grep - Not sure it makes sense!

I have 3 files in directory mydir named as follows, I run the sequence of commands shown below and I have questions at the result. File names are: ABC_GP0 ABC_GP0.ctl ABC_GPX Commands and results: $ ls /mydir/ | grep * <-- (q1) I get nothing - OK $ ls /mydir/ | grep... (5 Replies)
Discussion started by: GNMIKE
5 Replies

4. Shell Programming and Scripting

BASH: How do I grep on a variable? (or simmilar question that makes sense)

Hi, I've been running code which very frequently calls books.csv. e.g: grep -i horror books.csv > tempExcept, I'm trying to move away from using temporary files or frequently calling books.csv to improve efficiency. So I tried something like bookfile=$(cat books.csv) grep -i horror... (4 Replies)
Discussion started by: Quan
4 Replies

5. Shell Programming and Scripting

compare two files, diff the result

Hi Everyone, 1.txt 00:01:01 asdf 00:33:33 1234 00:33:33 0987 00:33:33 12 00:33:33 444 2.txt vvvv|ee 444|dd33|ee dddd|ee 12|ee 3ciur|fdd the output should be: (6 Replies)
Discussion started by: jimmy_y
6 Replies

6. Shell Programming and Scripting

Find diff bet 2 files and store result in another file

Hi I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file. I am doing this in awk. Here is my file1: Blocks... (2 Replies)
Discussion started by: ladyAnne
2 Replies

7. Programming

This Makes NO sense. I'm making a game and getting an error, need help.

Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an error... (1 Reply)
Discussion started by: lemonoid
1 Replies

8. Shell Programming and Scripting

Shell Text Based Game, This Error Makes NO sense. Please help

Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an... (3 Replies)
Discussion started by: lemonoid
3 Replies

9. Shell Programming and Scripting

Padding diff result

Hi, Is there a way to add padding to a diff result in unix so number of "< .." lines will be equal to number of "> .." lines? For example, if the original result is: 9a10 > "line which exists only in one file" The changed result would be: 9a10 < "noMatch" --- > "line which exists... (5 Replies)
Discussion started by: Somename
5 Replies
ECACCESS-FILE-MOVE(1p)					User Contributed Perl Documentation				    ECACCESS-FILE-MOVE(1p)

NAME
ecaccess-file-move - Move or Rename ECaccess Files SYNOPSIS
ecaccess-file-move -version|-help|-manual ecaccess-file-move [-debug] source-ecaccess-file target-ecaccess-file DESCRIPTION
Allow moving an ECaccess File. When the move occurs within the same ECaccess File System then it is a rename. When the move occurs across two different ECaccess File Systems then first a copy is done and then a delete of the original file is done (e.g. similar to ecaccess- file-copy ... -erase). The source-ecaccess-file and target-ecaccess-file are in the form [domain:][/user-id/]path. Please read the "Shell commands -> File Management" section of the "ecaccess" guide for more information on the ECaccess File System. ARGUMENTS
source-ecaccess-file The source ECaccess File name. target-ecaccess-file The target ECaccess File name. OPTIONS
-version Display version number and exits. -help Print a brief help message and exits. -manual Prints the manual page and exits. -debug Display the SOAP messages exchanged. EXAMPLES
ecaccess-file-move ec:test1.txt ec:test2.txt Rename the test1.txt file in the ECFS directory of the authenticated user in test2.txt. ecaccess-file-move ec:test1.txt home:test2.txt Copy the test1.txt file from the ECFS directory of the authenticated user to the test2.txt file in the $HOME directory of the authenticated user, then delete the test1.txt file from ECFS. SEE ALSO
ecaccess-file-delete, ecaccess-file-get, ecaccess-file-mget, ecaccess-file-modtime, ecaccess-file-mput, ecaccess-file-rmdir, ecaccess-file- copy, ecaccess-file-dir, ecaccess-file-mdelete, ecaccess-file-mkdir, ecaccess-file-chmod, ecaccess-file-put, ecaccess-file-size and ecaccess. perl v5.14.2 2012-04-16 ECACCESS-FILE-MOVE(1p)
All times are GMT -4. The time now is 05:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy