![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix Performence | nageswarag | UNIX for Dummies Questions & Answers | 0 | 04-02-2008 08:14 PM |
| System performence. | praveen_b744 | UNIX for Advanced & Expert Users | 5 | 09-17-2007 01:02 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need assistance to improve performence
Hello experts,
I have a series issue in script that result with bad peformence and I wonder if you can assist me. For example I have two files: File-New, size 15Mb. File-Old, size 1Mb. File-New content: a b c d File-Old content: d f a b c Result fiel should be: !a !b !c !d -f The current script comapre the lines between these two files in a special order and it takes so long. The script that currently runs, do the following: #!/bin/sh #Input: # $1 means File-Old # $2 means File-New #! - MarkForChange #- MarkForDeletetion while read line do grep -Fi "$line" $2 >/dev/null 2>&1 if [ "$?" -eq "0" ]; then echo "! $line" else echo "- $line" fi done < $1 Do you have any idea how to improve the process.(It take more then hour to run...:-( Thanks, Roy. Last edited by roybe; 06-13-2005 at 12:56 PM.. Reason: More datd |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|