Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:INPUT:*:{
- inc %words $0
- inc %spaces $count($1-,$chr(32))
- inc %vowels $count($1-,A,E,I,O,U)
- inc %consonants $count($1-,B,C,D,F,G,H,J,K,L,M,N,P,Q,R,S,T,V,W,X,Y,Z)
- inc %lines
- inc %chrs $len($remove($1-,$chr(32)))
- }
- alias wcount {
- if ($2 == reset) {
- unset %words %lines %chrs
- echo -a Your stats have been reset!
- }
- else {
- $iif($isid,return,say) I have typed a total of $bytes(%words,db) words, which was $bytes(%chrs,db) characters and $bytes(%spaces,db) spaces, in a total of $bytes(%lines,db) lines, $bytes(%vowels,db) were vowels and $bytes(%consonants,db) were consonants!
- }
- }
Add Comment
Please, Sign In to add comment