Scroll to navigation

FUNCOES ZZ(1) General Commands Manual FUNCOES ZZ(1)

NAME

funcoeszz - script with 65 useful mini applications

SYNOPSIS

funcoeszz is a bash script that contains 65 useful applications, ready to run from command line on UNIX systems (Linux, BSD, Cygwin, Mac OS X, and others). This functions includes:
Conversions and calculations (dates, hours, measure units, CPF, CNPJ)
 
File manipulation (change name, extension, content)
 
Data manipulation (statistics, filters, password generators)
 
Internet site queries (dictionaries, translators, news, searches)

DESCRIPTION

zzajuda

Show a help window with explanation and syntax of all functions. Usage: zzajuda

zzarrumanome

Renames files of the currently directory, fixing odd names. Obs.: It leaves everything in lowercase, without accentuation and change blank spaces, symbols and punctuation to '_'. Options: -n shows with will be done, but don't execute -d also rename the directories -r recursive Usage: zzarrumanome [-n] [-d] [-r] files(s) Ex.: zzarrumanome * zzarrumanome -n -d -r . # remove -n to rename! zzarrumanome "DOCUMENTO MALÃO!.DOC" # will be documento_malao.doc zzarrumanome "RAMONES - Don't Go.mp3" # will be ramones-dont_go.mp3

zzascii

Show the ASCII table witch all printable characters (32-126,161-255). The format is: <decimal> <hexadecimal> <octal> <ascii>. The number of columns and the table width are configurable. Usage: zzascii [columns] [width] Ex.: zzascii zzascii 4 zzascii 7 100

zzbeep

Waits N minutes and run a beep using the speaker. Useful to remember soon events. Without arguments, restore the 'beep' to original tone and duration. Obs: The beep have 4 toms, 2 in the text mode and only one in Xterm. Usage: zzbeep [minutes] Ex.: zzbeep 0 zzbeep 1 5 15 # waits 1 minute, after more 5, and after more 15

zzbyte

Byte units conversion (megabyte, megabyte, megabyte, etc). Usage: zzbyte N [unit1] [unit2] # BKMGTPEZY Ex.: zzbyte 2048 # As is 2048 bytes? -- 2K zzbyte 2048 K # As is 2048KB? -- 2M zzbyte 7 K M # 7K in Megabytes -- 0.006M zzbyte 7 G B # 7 Gigabytes in bytes -- 7516192768B for u in b k m g t p e z y; do zzbyte 2 t $u; done

zzcalcula

Calculator. The main operators are + - / * ^ %, see others in "man bc". Usage: zzcalcula number operation number Ex.: zzcalcula 2,20 + 3.30 # comma or point zzcalcula '2^2*(4-1)' # with precedences echo 2 + 2 | zzcalcula # reading from STDIN

zzcalculaip

Calcs the network address and broadcast address from IP and netmask. Obs.: the default mask is 255.255.255.0. Usage: zzcalculaip ip [netmask] Ex.: zzcalculaip 127.0.0.1 24 zzcalculaip 10.0.0.0/8 zzcalculaip 192.168.10.0 255.255.255.240 zzcalculaip 10.10.10.0

zzchavepgp

http://pgp.mit.edu Search for a PGP key, provided the name or e -mail address of the person. Usage: zzchavepgp name|e-mail Ex.: zzchavepgp Carlos Oliveira da Silva zzchavepgp carlos@dominio.com.br

zzcinclude

Show the funções of a C library file (.h files). Obs.: The search default directory is /usr/include. Usage: zzcinclude library-name Ex.: zzcinclude stdio zzcinclude /my/alternative/path/stdio.h

zzcnpj

Generate a valid aleatory CNPJ or validates a CNPJ provided. Obs.: The CNPJ can be formated (points and dash) or not. Usage: zzcnpj [cnpj] Ex.: zzcnpj 12.345.678/0001-95 # validates the CNPJ zzcnpj 12345678000195 # not formated zzcnpj # generate a valid CNPJ

zzcontapalavra

Count the number of times a word appears in a file. Obs.: It is diferent from grep -c, witch don't count several words in the same line. Options: -i ignores lowercase/uppercase -p partial search, count excerpts of words Usage: zzcontapalavra [-i|-p] word files(s) Ex.: zzcontapalavra root /etc/passwd zzcontapalavra -i -p a /etc/passwd # Compare with grep -ci a

zzconverte

kf = (K)elvin to (F)ahrenheit km = (K)Quilômetros to (M)iles mk = (M)ilhas to (K)ilometers db = (D)ecimal to (B)inary bd = (B)inário to (D)ecimal cd = (C)aractere to (D)ecimal dc = (D)ecimal to (C)haracter dh = (D)ecimal to (H)exadecimal hd = (H)exadecimal to (D)ecimal Usage: zzconverte <cf|fc|ck|kc|fk|kf|mk|km|db|bd|cd|dh|hd> number Ex.: zzconverte cf 5 zzconverte dc 65 zzconverte db 32

zzcores

Show all possible colors combinations on console. Also show the ANSI codes to obtain that combinations. Usage: zzcores

zzcpf

Generate a valid aleatory CPF or validates a CPF provided. Obs.: The CPF can be formated (points and dash) or not. Usage: zzcpf [cpf] Ex.: zzcpf 123.456.789-09 # validates the CPF zzcpf 12345678909 # not formated zzcpf # generates a valid CPF

zzdata

Makes calculations with dates and/or convert data to num and num to data. Which day will be 45 days after today?How many days is between two dates? zzdata! When called with only one parameter acts as a data converter to integer numbers (N days after Epoch) and vice-versa. Obs.: It takes into account leap years (Epoch = 01/01/1970, editable) Usage: zzdata data|num [+|- data|num] Ex.: zzdata 22/12/1999 + 69 zzdata today - 5 zzdata 01/03/2000 - 11/11/1999 zzdata today - dd/mm/aaaa < use your birthday to test

zzdetransp

http://www.detran.sp.gov.br Queries rates of vehicle, such as licensing, IPVA and fines (Detran-SP). Author: Elton Simões Baptista <elton (a) inso com br> Usage: zzdetransp número-renavam Ex.: zzdetransp 123456789

zzdicasl

http://www.dicas-l.unicamp.br Search for tips about certain topic on Dicas-L. Obs.: grep options can be used (-i is already default). Usage: zzdicasl [grep-option] word(s) Ex.: zzdicasl ssh zzdicasl -w vi zzdicasl -vEw 'windows|unix|emacs'

zzdicbabelfish

http://babelfish.altavista.digital.com Translate words/phrases/texts between idioms. Obs.: Default is english -> portuguese Idioms: pt_en pt_fr es_en es_fr it_en it_fr de_en de_fr fr_en fr_de fr_el fr_it fr_pt fr_nl fr_es ja_en ko_en zh_en zt_en el_en el_fr nl_en nl_fr ru_en en_zh en_zt en_nl en_fr en_de en_el en_it en_ja en_ko en_pt en_ru en_es Usage: zzdicbabelfish [idiom] word(s) Ex.: zzdicbabelfish my dog is green zzdicbabelfish pt_en falcão é massa zzdicbabelfish en_de my hovercraft if full of eels

zzdicbabylon

http://www.babylon.com Translate ONE WORD in english to several idioms. French, german, japanese, italian, hebrew, spanish, dutch and portuguese. Default is portuguese. Usage: zzdicbabylon [idiom] palavra #idiom:dut fre ger heb ita jap ptg spa Ex.: zzdicbabylon hardcore zzdicbabylon jap tree

zzdicjargon

http://catb.org/jargon/ The Jargon File Usage: zzdicjargon word(s) Ex.: zzdicjargon virgin zzdicjargon all your base are belong to us

zzdicportugues

http://www.portoeditora.pt/dol Portuguese dictionary (from Portugal). Usage: zzdicportugues word Ex.: zzdicportugues bolacha

zzdictodos

Use all the dictionary functions and translation at once. Usage: zzdictodos word Ex.: zzdictodos Linux

zzdiffpalavra

Show the difference between two texts, word by word. Useful to check spelling revisions or small changes in phrases. Obs.: If you have many diferent *lines*, use the diff command. Usage: zzdiffpalavra file1 file2 Ex.: zzdiffpalavra texto-orig.txt texto-novo.txt

zzdolar

http://br.invertia.com Search the dollar quotation of the day (comercial, paralelo e turismo). Obs.: The quotes are updated every 10 minutes. Usage: zzdolar

zzdominiopais

http://www.iana.org/cctld/cctld-whois.htm Search the description of an Internet country code (.br, .us, etc). Usage: zzdominiopais [.]code|text Ex.: zzdominiopais .br zzdominiopais br zzdominiopais republic

zzdos2unix

Converts text files from Windows/DOS (CR+LF) format to Unix (LF). Obs.: Also removes the file execution permission, if present. Usage: zzdos2unix files(s) Ex.: zzdos2unix frases.txt

zzfoneletra

Conversion of phones containing letters to number only. Author: Rodolfo de Faria <rodolfo faria (a) fujifilm com br> Usage: zzfoneletra telephone Ex.: zzfoneletra 2345-LINUX # Return 2345-54689 echo 5555-HELP | zzfoneletra # Return 5555-4357

zzfreshmeat

http://freshmeat.net Search for programs on Freshmeat site. Usage: zzfreshmeat programa Ex.: zzfreshmeat tetris

zzgoogle

http://google.com Search on google directly from command line. Usage: zzgoogle [-n <number>] word(s) Ex.: zzgoogle receita de bolo de abacaxi zzgoogle -n 5 ramones papel higiênico cachorro

zzhora

do calculations with hours. The option -r returns the calc relative to the first data, by example: 02:00 - 03:30 = -01:30 (sem -r) e 22:30 (com -r) Usage: zzhora [-r] hh:mm [+|- hh:mm] Ex.: zzhora 8:30 + 17:25 # sum two hours zzhora 12:00 - now # time to lunch zzhora -12:00 + -5:00 # negative hours! zzhora 1000 # how many time is 1000 minutes? zzhora -r 5:30 - 8:00 zzhora -r agora + 57:00

zzhoracerta

http://www.worldtimeserver.com Display the time of a particular location. If any parameter is past, all available locations will be listed. The option -s makes the search only with the initials. Usage: zzhoracerta [-s] local Ex.: zzhoracerta rio grande do sul zzhoracerta -s br zzhoracerta rio zzhoracerta us-ny

zzhowto

http://www.ibiblio.org Search for howtos Usage: zzhowto [--atualiza] word Ex.: zzhowto apache zzhowto --atualiza

zzipinternet

http://www.whatismyip.com Show your external IP address on internet. Usage: zzipinternet Ex.: zzipinternet

zzkill

Kill process by the nome of the origin command. the -n option, ust shows what will be done, but not executed. Usage: zzkill [-n] command1 [command2 ...] Ex.: zzkill netscape zzkill netsc soffice startx

zzlimpalixo

Remove blank lines and comments from files. Obs.: Acept data from STDIN. Usage: zzlimpalixo [filess] Ex.: zzlimpalixo ~/.vimrc cat /etc/inittab | zzlimpalixo

zzlinha

Show a linha of a text, random or informed by the number. Usage: zzlinha [número | -t texto] [files(s)] Ex.: zzlinha /etc/passwd # show any line, random. zzlinha 9 /etc/passwd # show line 9 of the file zzlinha -2 /etc/passwd zzlinha -t root /etc/passwd cat /etc/passwd | zzlinha

zzlinuxnews

http://... - vários Search the latest news about Linux on sites in English. Obs.: The sites and the identifications are: F)reshMeat Linux T)oday S)lashDot Linux W)eekly News N)ewsForge O)S News Usage: zzlinuxnews [sites] Ex.: zzlinuxnews zzlinuxnews fsn

zzlocale

http://funcoeszz.net/locales.txt Search the code of language (locale). For example, Brazilian Portuguese is pt_BR. the -c option searches only in the codes. Usage: zzlocale [-c] código|texto Ex.: zzlocale chinese zzlocale -c pt

zzloteria

http://www1.caixa.gov.br/loterias Search the results of quina, megasena, duplasena, lotomania e lotofácil. Usage: zzloteria [quina | megasena | duplasena | lotomania | lotofacil] Ex.: zzloteria zzloteria quina megasena

zzmaiores

Finde the biggest files/directories of the current directory (or others). Options: -r recursive -f search only files -n number of results (default is 10) Usage: zzmaiores [-r] [-f] [-n <number>] [dir1 dir2 ...] Ex.: zzmaiores zzmaiores /etc /tmp zzmaiores -r -n 5 ~

zzmaiusculas

Conversion between lowercase and UPPERCASE. Usage: zzmaiusculas [arquivo] Ex.: zzmaiusculas /etc/passwd echo NÃO ESTOU GRITANDO | zzmaiusculas

zzminusculas

Conversion between LOWERCASE and uppercase. Usage: zzminusculas [arquivo] Ex.: zzminusculas /etc/passwd echo NÃO ESTOU GRITANDO | zzminusculas

zzmoeda

http://br.invertia.com Search the quotation of several currencies (more than 100!) in relation to dollar. Usage: zzmoeda [-t] [pesquisa] Ex.: zzmoeda zzmoeda -t zzmoeda euro libra zzmoeda -t peso

zznatal

http://www.ibb.org.br/vidanet The message "Happy Christmas" in several languages. Usage: zznatal [word] Ex.: zznatal # random zznatal russo # Happy Christmas in russian

zznomefoto

Rename files in the current directory, fixing the numerical sequence. Obs.: Useful to passing on files of photos downloaded from a camera. Options: -n show with will be done, but don't execute. -i the initial value -d number of digits -p default prefix Usage: zznomefoto [-n] [-i N] [-d N] [-p TXT] files(s) Ex.: zznomefoto -n * zznomefoto -n -p churrasco- *.JPG zznomefoto -n -d 4 -i 500 *.JPG

zznoticiaslinux

http://... - vários Search the latest news about linux on brasilian sites. Y)ahoo Linux B)r Linux C)ipsga N)otícias linux V)iva o Linux U)nder linux Usage: zznoticiaslinux [sites] Ex.: zznoticiaslinux zznoticiaslinux yn

zznoticiassec

http://... - vários Search the latest news on sites specializing in security. Obs.: The sites and the identifications are: Linux Security B)rasil Linux T)oday - Security Linux S)ecurity Security F)ocus C)ERT/CC Usage: zznoticiassec [sites] Ex.: zznoticiassec zznoticiassec bcf

zzpronuncia

http://www.m-w.com Show the correct pronounce of a word, in english. Usage: zzpronuncia word Ex.: zzpronuncia apple

zzramones

http://aurelio.net/doc/misc/ramones.txt Show a random phrase, from the lyrics of Ramones. Usage: zzramones [word] Ex.: zzramones punk zzramones

zzrpmfind

http://rpmfind.net/linux Search for rpm files Obs.: The default architecture is i386. Usage: zzrpmfind pacote [distro] [arch] Ex.: zzrpmfind sed zzrpmfind lilo mandr i586

zzsecurity

http://... - vários Show the last 5 security alerts of Linux/UNIX systems. Supported: Debian Fedora FreeBSD Gentoo Mandriva Slackware Suse Ubuntu. Usage: zzsecurity [distros] Ex.: zzsecutiry zzsecurity fedora zzsecurity debian gentoo

zzsenha

generates a random password with N characters with numbers and letters. Obs.: The generated password don't have repeated. Usage: zzsenha [n] (default n=6) Ex.: zzsenha zzsenha 8

zzseq

Shows a numerical sequence, line by line Obs.: Emulation of the seq command. Usage: zzseq [número-inicial] número-final Ex.: zzseq 5 zzseq 10 5

zzsigla

http://www.acronymfinder.com Dictionary of acronyms, on any subject (such as DVD, IMHO, WYSIWYG). Obs.: There is a daily limit of consultations over IP, it can stop temporarily. Usage: zzsigla acronym Ex.: zzsigla RTFM

zzss

Screen Saver for console, with colors and themes Themes: mosaico, espaco, olho, aviao, jacare, alien, rosa, peixe, siri. Obs.: Ctrl+C to exit. Usage: zzss [--rapido|--fundo] [--tema <tema>] [texto] Ex.: zzss zzss fui ao banheiro zzss --rapido / zzss --fundo --tema peixe

zztempo

http://weather.noaa.gov/ Show the conditions of time (weather) in a particular location. Without args, all available countries will be listed. If only the country is specified, their locations are listed. The symbols can also be used, for example SBPA = Porto Alegre. Usage: zztempo <país> <localidade> Ex.: zztempo 'United Kingdom' 'London City Airport' zztempo brazil 'Curitiba Aeroporto' zztempo brazil SBPA

zztool


zztrocaarquivos

Exchange the contents of two files, maintaining their original permissions. Usage: zztrocaarquivos file1 file2 Ex.: zztrocaarquivos /etc/fstab.bak /etc/fstab

zztrocaextensao

Change the extension of the files specified. the -n option will simulate the execution Usage: zztrocaextensao [-n] new old files(s) Ex.: zztrocaextensao -n .doc .txt * # tire o -n para renomear!

zztrocapalavra

Change one word for another, in the files specified. Obs.: It is possible use regexp. Usage: zztrocapalavra old new files(s) Ex.: zztrocapalavra excessão exceção *.txt

zzuniq

Remove the repeated lines, consecutive or not. Obs.: Dont chage the original order of lines, different of sort|uniq. Usage: zzuniq [arquivo] Ex.: zzuniq /etc/inittab cat /etc/inittab | zzuniq

zzunix2dos

Convert text files in Unix format (LF) to Windows/DOS (CR+LF). Usage: zzunix2dos files(s) Ex.: zzunix2dos frases.txt

zzwhoisbr

http://registro.br Show informations about brazilian internet domains (.com.br, .org.br, etc). Usage: zzwhoisbr domínio Ex.: zzwhoisbr abc.com.br zzwhoisbr www.abc.com.br

zzwikipedia

http://www.wikipedia.org Search on wikipedia, the free encyclopedia Obs.: The default idiom is portuguese. Idioms: de (german) eo (esperanto) es (spanish) fr (french) it (italian) ja (japanese) la (latin) pt (portuguese) Usage: zzwikipedia [-idiom] word(s) Ex.: zzwikipedia sed zzwikipedia Linus Torvalds zzwikipedia -pt Linus Torvalds

zzzz

Show informations about all functions, with version (Brazilian Portuguese) Options: --atualiza download the newest version of the functions --teste test if the pre-requisites are OK --bashrc install the functions on ~/.bashrc --tcshrc install the functions on ~/.tcshrc Usage: zzzz [--atualiza|--teste|--bashrc|--tcshrc] Ex.: zzzz zzzz --teste

AUTHOR

funcoeszz was written by Aurelio Marinho Jargas.
This manual page was written by Eder L. Marques <eder@edermarques.net>, for the Debian project (but may be used by others).
May 28, 2008