erase

By _Daniel_ on Aug 21, 2008

Erase equal lines of a file.. I did not have time to test yet... any problem contact me pls
Sintaxe: /erase file.EXT

alias erase {
var %% = $+(",$shortfn($$1-),"), %' 1, %o 0, %eko .echo -mat $$1-
if (!$exists(%%)) { %eko File not found | return }
%eko Initiating search for repeated lines in the $lines(%%)
while (%' <= $lines(%%)) {
var %^ = $calc(%'+1)
while ($read(%%,w,$+(*,$read(%%,%'),*),%^)) {
write $+(-dl,$readn) %%
%^ = $readn
inc %o
}
inc %'
}
%eko Number of lines repeated in the file $+(%o,$chr(46))
}

Comments

Sign in to comment.
Ghost-writer   -  Nov 20, 2009

i would rate it 1 but i dont want to increase the score.

 Respond  
Lalk   -  Aug 04, 2009

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

 Respond  
Eugenio   -  Aug 22, 2008

rofl dont "tsch" me son
you didnt have "time" to test your code then you shouldnt have time to post on hawkee
simple as.

and thats quite nice for typo
;x

 Respond  
Paul_1337noob   -  Aug 22, 2008

typo be polite in your comments

ugh, they come to this website to get and give help in there own good will and time,
they want to assist in ways that will benefit you not debug your scripts, but people are putting no effort in expect everybody else to do the work for them.

I did not have time to test yet... any problem contact me pls

 Respond  
_Daniel_   -  Aug 22, 2008

I will check the script .. typo be polite in your comments... Eugenio tsch...

 Respond  
Eugenio   -  Aug 22, 2008

I concur with typo in a way
-.-

 Respond  
Typo   -  Aug 22, 2008

Unfortunately that doesnt matter anymore.

Even when a mod catchs something like this sad excuse for a code and removes it, it usually takes half a day or more so its already damage done.

In my opinion modding is only good when done in a timely manner. You can't catch something 8-10 hours after it happens because hundreds or hopefully even thousands of people will already have been thru the site in that of time.

Maybe the site needs some more mods and if so there are those of us who want this site to succeed and would love to clean up our act a little and take some of our time to help keep this place in good shape.

The sad fact is that recently, exactly this kind of thing is getting posted more and more often and hawkee is already losing users because of it and will probably lose a lot more if something doesn't change.

No it isn't possible to keep people lacking intelligence away or even keep them from posting and commenting but those people are a lot easier to deal with when they're kept in check.

Nobody wants to take a lot of time to make a nice script and take the time to post it just to have a bunch of scripts posted right before and after that are completely useless or dont even work. I know one time that it actually happened to a friend and the script was seriously overlooked due to being lost in the middle of all that crap.

Ok, I think I'm done now.

 Respond  
Cheiron   -  Aug 22, 2008

one comment.... erase

well... start over anyway and have a read up on loops etc before posting. submitted snippets must be working as per hawkee rules of posting.

 Respond  
Typo   -  Aug 22, 2008

This is another example of a peice of crap code and I'm getting sick and tired of seeing this garbage on the site.
Why paste a code you haven't even had the time to test?
This is FULL of problems like:
Your second while loop increases %o which is set initially to 0 and never used again.

inc = %o

needs to be

inc %o

and

while ($read(%%,w,$+(*,$read(%%,%'),*),%^) 

needs to be

while ($read(%%,w,$+(*,$read(%%,%'),*),%^))

and

($exists(%%))

needs to be

(!$exists(%%))

On top of all that your second while loop does nothing but write one line to the file.

There is not even code to actually look for matching aka identicle lines.

If you fix all the problems i listed that would keep it from even running, the only thing it would do right now is leave you with a file with one line, the last line and would message you saying it found # matchs where # is actually the number of lines in the file minuse one.

Forget the fact that even posting before you test is utterly stupid and even verges on beind rude this script is a joke.

A bad bad joke.

You should be tarred and feathered.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.