shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Tabelas hash


From: Tiago Barcellos Peczenyj
Subject: Re: [shell-script] Tabelas hash
Date: Mon, 21 Jul 2008 10:32:04 -0300

Vc pode usar facilmente em ZSH

dl128144% typeset -A myHash
dl128144% myHash["oi"]="boi"
dl128144% myHash["foo"]="bar"
dl128144% echo $myHash["oi"] $myHash["foo"]
boi bar
dl128144% echo $myHash[*]
bar boi
dl128144% for i in  $myHash[*] ; do echo $i ; done
bar
boi

Abraços

2008/7/20 Felipe <address@hidden>:
> Olá, lista, alguem saberia me dizer se é possivel criar tabelas hash
> em bash script ?
>
> ou até mesmo dicionarios, como no python.
>
> por exemplo em python:
>
> dic={
> "chave":"valor",
> "chave1":"valor1"
> }
>
> como associaria palavras chaves a valores em shell ?
>
> obrigado desde já.
>
> 



-- 
Tiago B Peczenyj
Linux User #405772

http://peczenyj.blogspot.com/
"what does not kill us makes us stronger"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]