<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Another Geek Blog &#187; shell</title>
	<atom:link href="http://geek.linuxman.pro.br/tag/shell/feed" rel="self" type="application/rss+xml" />
	<link>http://geek.linuxman.pro.br</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 16 Dec 2011 01:55:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Criando DNS dinâmicos com sua conta no DreamHost</title>
		<link>http://geek.linuxman.pro.br/geek/criando-dns-dinamicos-com-sua-conta-no-dreamhost</link>
		<comments>http://geek.linuxman.pro.br/geek/criando-dns-dinamicos-com-sua-conta-no-dreamhost#comments</comments>
		<pubDate>Fri, 08 Oct 2010 11:30:57 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=1454</guid>
		<description><![CDATA[Sou cliente do DreamHost já faz um tempo e acho o serviço deles sensacional. Uma feature que eu ainda não tinha usado é a API que eles disponibilizam para todos os clientes. Bem bacana e flexível. Como em casa eu tenho IP dinâmico e vez por outra ele muda justamente quando preciso acessar de volta [...]]]></description>
			<content:encoded><![CDATA[<p>Sou cliente do DreamHost já faz um tempo e acho o serviço deles sensacional.</p>
<p>Uma feature que eu ainda não tinha usado é a API que eles disponibilizam para todos os clientes. Bem bacana e flexível.</p>
<p>Como em casa eu tenho IP dinâmico e vez por outra ele muda justamente quando preciso acessar de volta resolvi aproveitar e fiz um shell script quick&#8217;n dirty pra usar esse recurso bacana.</p>
<p>Sei que existem diversos serviços de DNS dinâmico por ai, mas preferi essa alternativa que pode ser útil pra mais alguém com uma necessidade parecida. <img src='http://geek.linuxman.pro.br/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://pastebin.com/XTK05EEV">Tá aqui o script</a>.</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/dreamhost" title="dreamhost" rel="tag">dreamhost</a>, <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/criando-dns-dinamicos-com-sua-conta-no-dreamhost/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Túnel SSH reverso</title>
		<link>http://geek.linuxman.pro.br/geek/tunel-ssh-reverso</link>
		<comments>http://geek.linuxman.pro.br/geek/tunel-ssh-reverso#comments</comments>
		<pubDate>Thu, 07 Oct 2010 11:30:45 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=1448</guid>
		<description><![CDATA[Dica rápida e muito útil: Se você já precisou acessar um servidor Linux atrás de um NAT sobre qual você não tem controle sabe como seria bom poder iniciar a conexão do lado do servidor conectando de volta em você. Isso é possível com um túnel SSH reverso. A idéia é que o servidor que [...]]]></description>
			<content:encoded><![CDATA[<p>Dica rápida e muito útil:</p>
<p>Se você já precisou acessar um servidor Linux atrás de um NAT sobre qual você não tem controle sabe como seria bom poder iniciar a conexão do lado do servidor conectando de volta em você.</p>
<p>Isso é possível com um túnel SSH reverso. A idéia é que o servidor que você deseja acessar inicia a conexão do lado dele, conecta-se na sua máquina e disponibiliza, via túnel SSH uma porta de volta pra ele.</p>
<p><a href="http://geek.linuxman.pro.br/wp-content/uploads/2010/10/openssh.gif"><img class="aligncenter size-full wp-image-1451" title="openssh" src="http://geek.linuxman.pro.br/wp-content/uploads/2010/10/openssh.gif" alt="" width="520" height="155" /></a></p>
<p>Eu uso isso como um acesso rápido de casa para a empresa naqueles casos onde preciso só acessar rapidamente alguma coisa vinha linha de comando. Tenho acesso VPN se precisar de email, Terminal Services, etc. Seria possível fazer tudo via túnel, mas ai o desempenho não fica grandes coisas e nem é tão conveniente.</p>
<p>O comando (a ser executado do servidor atrás do NAT) é:</p>
<pre>ssh -nNT -R 2222:localhost:22 username@suamaquina</pre>
<p>Uma vez estabelecido o túnel você pode conectar de volta à partir da sua máquina utilizando:</p>
<pre>ssh -p 2222 username@localhost</pre>
<p>Como é possível que a conexão caia, o processo trave ou sei lá o que mais, recomendo os seguintes truques:</p>
<ul>
<li>Use <a href="http://www.dicas-l.com.br/arquivo/logando_com_seguranca_num_servidor_ssh_sem_uso_de_senha.php">chaves públicas para autenticação</a>, assim não precisa de senha</li>
<li>Rode a sessão inicial dentro do <a href="http://www.gnu.org/software/screen/">screen</a>, isso evita perder o console</li>
<li>Rode o túnel dentro de um loop while, pro processo poder ser restaurado caso morra</li>
<li>Pra evitar alguém te sacanear crie um usuário dedicado pra essa conexão e aponte o shell dele para /bin/false</li>
</ul>

	Tags: <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a>, <a href="http://geek.linuxman.pro.br/tag/ssh" title="ssh" rel="tag">ssh</a>, <a href="http://geek.linuxman.pro.br/tag/sysadmin" title="sysadmin" rel="tag">sysadmin</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/tunel-ssh-reverso/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Alerta de tempestade no email (Canadá)</title>
		<link>http://geek.linuxman.pro.br/geek/alerta-de-tempestade-no-email-canada</link>
		<comments>http://geek.linuxman.pro.br/geek/alerta-de-tempestade-no-email-canada#comments</comments>
		<pubDate>Sun, 26 Jul 2009 22:53:07 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[neve]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=1195</guid>
		<description><![CDATA[Aqui no Canadá o clima é bem mais radical que na terra das palmeiras e o governo e as empresas de previsão do tempo disparam alertas contantes quando a coisa ameaça ficar feia. É só acessar algum dos sites de previsão de tempo e olhar se tem algum alerta para a região. Mas isso implica [...]]]></description>
			<content:encoded><![CDATA[<p>Aqui no Canadá o clima é bem mais radical que na terra das palmeiras e o governo e as empresas de previsão do tempo disparam alertas contantes quando a coisa ameaça ficar feia.</p>
<p>É só acessar algum dos sites de previsão de tempo e olhar se tem algum alerta para a região. Mas isso implica em olhar o site. Lógico que por uma módica quantia eles podem te mandar um SMS avisando quando o bicho pega na sua região, mas porquê eu deveria pagar por uma coisa que é grátis em primeiro lugar?</p>
<p>Então desde que mudamos para cá fiz esse script &#8220;quick n&#8217; dirty&#8221; rodando no <a href="http://www.dreamhost.com">Dreamhost</a> e monitorando se aparece algum alerta. Poderia ser melhor, mais completo, mais bonito e em Python. Mas raios&#8230; eu só quero saber se posso sair de casa sem ficar atolado em neve ou ser pego por um furacão.</p>
<p>O código tá abaixo. Só mude os parâmetros, incluindo o email do seu celular para receber o SMS.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">LOCATION</span>=<span style="color: #ff0000;">&quot;http://www.theweathernetwork.com/weather/cans0057&quot;</span>
<span style="color: #007800;">FILE</span>=<span style="color: #ff0000;">&quot;/path/do/script_dir/status/aviso&quot;</span>
<span style="color: #007800;">LOG</span>=<span style="color: #ff0000;">&quot;/path/do/script_dir/log/weather.log&quot;</span>
<span style="color: #007800;">DATE</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">EMAIL</span>=celular<span style="color: #000000; font-weight: bold;">@</span>sms.operadora.ca
&nbsp;
<span style="color: #007800;">ALERTA</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">lynx</span> <span style="color: #660033;">--dump</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCATION</span>&quot;</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;warning &quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">head</span> -<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$ALERTA</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$FILE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
    <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Alerta de tempestade. Mandando aviso em <span style="color: #007800;">$DATE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$LOG</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$ALERTA</span>&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;]&quot;</span> <span style="color: #660033;">-f2-</span> <span style="color: #000000; font-weight: bold;">|</span>mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;ALERT&quot;</span> <span style="color: #007800;">$EMAIL</span>
        <span style="color: #c20cb9; font-weight: bold;">touch</span>  <span style="color: #007800;">$FILE</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$FILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$FILE</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;fim da tempestade removendo aviso em <span style="color: #007800;">$DATE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$LOG</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>


	Tags: <a href="http://geek.linuxman.pro.br/tag/canada" title="Canada" rel="tag">Canada</a>, <a href="http://geek.linuxman.pro.br/tag/neve" title="neve" rel="tag">neve</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/alerta-de-tempestade-no-email-canada/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>De boas intenções&#8230;</title>
		<link>http://geek.linuxman.pro.br/geek/de-boas-intencoes</link>
		<comments>http://geek.linuxman.pro.br/geek/de-boas-intencoes#comments</comments>
		<pubDate>Thu, 11 Jun 2009 01:09:05 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=1118</guid>
		<description><![CDATA[Já dizia o velho deitado que de boas intenções o inferno está cheio. A pessoa que estou substituindo no novo emprego certamente tinha boas idéias, mas não gostei de como as implementações foram feitas até o momento. Talvez por ser um péssimo programador eu gosto de código limpo, variáveis auto-explicativas e uso extensivo de funções. [...]]]></description>
			<content:encoded><![CDATA[<p>Já dizia o <a href="http://desciclo.pedia.ws/wiki/Velho_Deitado">velho deitado</a> que de boas intenções o inferno está cheio. A pessoa que estou substituindo no novo emprego certamente tinha boas idéias, mas não gostei de como as implementações foram feitas até o momento.</p>
<p>Talvez por ser um péssimo programador eu gosto de código limpo, variáveis auto-explicativas e uso extensivo de funções. É o único jeito de eu não me perder dentro do meu próprio código.</p>
<p>Ai olhando o que achei até o momento dá no cérebro tentar entender alguns dos scripts. Fora alguns testes do tipo:</p>
<pre>if [ ${DIR}/X${USER} = ${DIR}/X -a `grep ${USER} \
/very/long/directory/path/user-list|wc -l` -gt 1 ]</pre>
<p>É. Eu sei. Medo. E documentação é para os fracos, caso estejam em dúvida.</p>
<p>Fica difícil criticar por um motivo muito simples: Tudo funciona redondo. Só é muito complicado alterar qualquer coisa. E eu estou assumindo no meio de uma migração, de forma que metade dos servidores funciona bem no ambiente antigo. Metade funciona quase bem no ambiente novo. Só não pede pra convesarem um com o outro. Ai a casa cai.</p>
<p>Mas hoje animei mais ainda. Numa reunião com o chefe ele me deu carta branca para fazer o que eu achar necessário. A única coisa que ele disse foi: Pega leva com o meu orçamento.</p>
<p>Como de pão-durismo eu dou aula e pretendo fazer tudo com software livre não acho que vou esbarrar em nenhuma restrição orçamentária. Talvez para backup eu precisei de algum hardware específico. Talvez uma tape library&#8230; Vou ter que analisar só isso com cuidado.</p>
<p>A única causa que ainda não sei se vou abraçar é a de qual distribuição usar&#8230; Eu sou Debian desde pequenininho, mas não tenho argumentos contra o CentOS exceto pelo fato dele não ser o Debian.</p>
<p>E pro storage rola outra dúvida: Linux ou Nexenta? Sabe como é&#8230; brtfs ainda é alpha e ZFS já posso sair usando amanhã.</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/centos" title="CentOS" rel="tag">CentOS</a>, <a href="http://geek.linuxman.pro.br/tag/debian" title="debian" rel="tag">debian</a>, <a href="http://geek.linuxman.pro.br/tag/iscsi" title="iscsi" rel="tag">iscsi</a>, <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/nexenta" title="nexenta" rel="tag">nexenta</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a>, <a href="http://geek.linuxman.pro.br/tag/solaris" title="solaris" rel="tag">solaris</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/de-boas-intencoes/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Arrays associativos no Bash 4.0</title>
		<link>http://geek.linuxman.pro.br/geek/arrays-associativos-no-bash-40</link>
		<comments>http://geek.linuxman.pro.br/geek/arrays-associativos-no-bash-40#comments</comments>
		<pubDate>Wed, 25 Feb 2009 17:45:09 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=798</guid>
		<description><![CDATA[O Bash 4.0 foi lançado na segunda-feira e trouxe uma nova capacidade que sempre vejo as pessoas pedindo:  Arrays associativos. E funciona que é uma maravilha&#8230; $ echo $BASH_VERSION 4.0.0&#40;1&#41;-release $ declare -A COMIDA $ COMIDA&#91;Arroz&#93;=Branco $ COMIDA&#91;Feijao&#93;=Tutu $ COMIDA&#91;Ovo&#93;=Frito $ COMIDA&#91;CARNE&#93;=Bife $ echo ${COMIDA[@]} Bife Tutu Branco Frito $ echo ${COMIDA[Arroz]} Branco $ echo [...]]]></description>
			<content:encoded><![CDATA[<p>O <a href="http://www.mail-archive.com/cygwin@cygwin.com/msg94439.html">Bash 4.0 foi lançado</a> na segunda-feira e trouxe uma nova capacidade que sempre vejo as pessoas pedindo:  Arrays associativos.</p>
<p>E funciona que é uma maravilha&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$BASH_VERSION</span>
4.0.0<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>-release
$ <span style="color: #7a0874; font-weight: bold;">declare</span> <span style="color: #660033;">-A</span> COMIDA
$ COMIDA<span style="color: #7a0874; font-weight: bold;">&#91;</span>Arroz<span style="color: #7a0874; font-weight: bold;">&#93;</span>=Branco
$ COMIDA<span style="color: #7a0874; font-weight: bold;">&#91;</span>Feijao<span style="color: #7a0874; font-weight: bold;">&#93;</span>=Tutu
$ COMIDA<span style="color: #7a0874; font-weight: bold;">&#91;</span>Ovo<span style="color: #7a0874; font-weight: bold;">&#93;</span>=Frito
$ COMIDA<span style="color: #7a0874; font-weight: bold;">&#91;</span>CARNE<span style="color: #7a0874; font-weight: bold;">&#93;</span>=Bife
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${COMIDA[@]}</span>
Bife Tutu Branco Frito
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${COMIDA[Arroz]}</span>
Branco
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${COMIDA[Feijao]}</span>
Tutu
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${COMIDA[Ovo]}</span>
Frito
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${COMIDA[CARNE]}</span>
Bife</pre></div></div>

<p>Mais informações sobre as novas features <a href="http://bash-hackers.org/wiki/doku.php/bash4">aqui</a>.</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/cli" title="CLI" rel="tag">CLI</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/arrays-associativos-no-bash-40/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Truques no Bash</title>
		<link>http://geek.linuxman.pro.br/geek/truques-no-bash</link>
		<comments>http://geek.linuxman.pro.br/geek/truques-no-bash#comments</comments>
		<pubDate>Thu, 15 Jan 2009 14:08:34 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=641</guid>
		<description><![CDATA[Alguns truques para facilitar o seu dia-a-dia na linha de comando: !$ Representa a última parte do último comando executado. Exemplo: $ grep macarrao comidas.txt macarrao $  cat !$ cat comidas.txt arroz feijao batata frita macarrao Expansão automática Expande automaticamente os valores entre chaves. Uma mão na roda para loops: $ for i in {1..4}; [...]]]></description>
			<content:encoded><![CDATA[<p>Alguns truques para facilitar o seu dia-a-dia na linha de comando:</p>
<h2>!$</h2>
<p>Representa a última parte do último comando executado. Exemplo:</p>
<pre>$ grep macarrao comidas.txt
macarrao</pre>
<pre>$  cat !$
cat comidas.txt
arroz
feijao
batata frita
macarrao</pre>
<h2>Expansão automática</h2>
<p>Expande automaticamente os valores entre chaves. Uma mão na roda para loops:</p>
<pre>$ for i in {1..4}; do echo "i vale $i"; done
i vale 1
i vale 2
i vale 3
i vale 4</pre>
<p>Também funciona com letras:</p>
<pre>$ for i in {a..d}; do echo "i vale $i"; done
i vale a
i vale b
i vale c
i vale d</pre>
<p>E pode ser útil em situações assim:</p>
<pre>$ mkdir -p diretorio{a..c}/sub-diretorio{w..z}</pre>
<pre>$ find .
.
./diretorioc
./diretorioc/sub-diretoriow
./diretorioc/sub-diretoriox
./diretorioc/sub-diretorioz
./diretorioc/sub-diretorioy
./diretoriob
./diretoriob/sub-diretoriow
./diretoriob/sub-diretoriox
./diretoriob/sub-diretorioz
./diretoriob/sub-diretorioy
./diretorioa
./diretorioa/sub-diretoriow
./diretorioa/sub-diretoriox
./diretorioa/sub-diretorioz
./diretorioa/sub-diretorioy</pre>
<h2>^antigo^novo</h2>
<p>Executa o último comando substituindo o valor antigo pelo novo. Exemplo:</p>
<pre>$ cat /etb/lsb-release
cat: /etb/lsb-release: No such file or directory</pre>
<pre>$ ^b^c
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"</pre>
<h2>!!</h2>
<p>Reexecuta o último comando. Útil quando você esqueceu algo, como o sudo na frente do comando. Exemplo:</p>
<pre>$ whoami
user</pre>
<pre>$ sudo !!
sudo whoami
root</pre>
<p>Mais truques e dicas <a href="http://samrowe.com/wordpress/advancing-in-the-bash-shell/">aqui</a>.</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/cli" title="CLI" rel="tag">CLI</a>, <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a>, <a href="http://geek.linuxman.pro.br/tag/unix" title="unix" rel="tag">unix</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/truques-no-bash/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Estou entre os maiores do shell scripting</title>
		<link>http://geek.linuxman.pro.br/geek/estou-entre-os-maiores-do-shell-scripting</link>
		<comments>http://geek.linuxman.pro.br/geek/estou-entre-os-maiores-do-shell-scripting#comments</comments>
		<pubDate>Wed, 05 Nov 2008 00:11:15 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=511</guid>
		<description><![CDATA[Na foto (esquerda pra direita): Eu, Júlio Cézar Neves e Aurélio Marinho Jargas. Autores de &#8220;Programacão Shell Linux&#8221; e  Shell Script Profissional. Entenderam? &#8220;Entre os maiores&#8221;? Hein? Hein? Macaco do Chongas rulez. Voltamos à programação normal. Tags: bash, Humor, scripts, shell]]></description>
			<content:encoded><![CDATA[<p><a href="http://geek.linuxman.pro.br/wp-content/uploads/2008/11/dsc00561.jpg"><img class="aligncenter size-full wp-image-512" title="dsc00561" src="http://geek.linuxman.pro.br/wp-content/uploads/2008/11/dsc00561.jpg" alt="" width="500" height="375" /></a></p>
<p>Na foto (esquerda pra direita): Eu, <a href="http://twiki.softwarelivre.org/TWikiBar/WebHome">Júlio Cézar Neves</a> e <a href="http://aurelio.net/">Aurélio Marinho Jargas</a>. Autores de <a href="http://www.submarino.com.br/produto/1/21390807/programacao+shell+linux">&#8220;Programacão Shell Linux&#8221;</a> e  <a href="http://www.shellscript.com.br/">Shell Script Profissional</a>.</p>
<p>Entenderam? &#8220;Entre os maiores&#8221;? Hein? Hein?</p>
<p><a href="http://geek.linuxman.pro.br/wp-content/uploads/2008/11/67bd70b8.jpg"><img class="aligncenter size-full wp-image-513" title="67bd70b8" src="http://geek.linuxman.pro.br/wp-content/uploads/2008/11/67bd70b8.jpg" alt="" width="260" height="295" /></a></p>
<p>Macaco do <a href="http://www.chongas.com.br">Chongas</a> rulez. Voltamos à programação normal.</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/humor" title="Humor" rel="tag">Humor</a>, <a href="http://geek.linuxman.pro.br/tag/scripts" title="scripts" rel="tag">scripts</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/estou-entre-os-maiores-do-shell-scripting/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>mkfile for Linux</title>
		<link>http://geek.linuxman.pro.br/codes/mkfile-for-linux</link>
		<comments>http://geek.linuxman.pro.br/codes/mkfile-for-linux#comments</comments>
		<pubDate>Fri, 03 Oct 2008 17:20:54 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[codes]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/?p=458</guid>
		<description><![CDATA[Eu não conhecia o mkfile do Solaris até ontem, mas foi só usar um pouco e deu pra ver que é muito mais prático e rápido do que ficar utilizando o dd no Linux. Não sei os meus 2 leitores geeks (já que meu pai, minha mãe e minha esposa &#8211; meus outros 3 leitores [...]]]></description>
			<content:encoded><![CDATA[<p>Eu não conhecia o mkfile do Solaris até ontem, mas foi só usar um pouco e deu pra ver que é muito mais prático e rápido do que ficar utilizando o <strong>dd</strong> no Linux.</p>
<p>Não sei os meus 2 leitores geeks (já que meu pai, minha mãe e minha esposa &#8211; meus outros 3 leitores &#8211; não se encaixam nesta categoria), mas eu tenho que olhar o man ou o google toda vez que preciso criar um arquivo em branco com o dd. Tenho algum tipo de bloqueio com aquela sintaxe chata dele.</p>
<p>Então resolvi perder uns minutos e fazer um mkfile for Linux, em bash script mesmo. Divirtam-se.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#=============================================================================</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># mkfile - bash implementation of Solaris' mkfile tool for Linux</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Usage:  mkfile [-v] size [g | k | b | m] filename</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#   Eri Ramos Bastos</span>
<span style="color: #666666; font-style: italic;">#   http://geek.linuxman.pro.br</span>
<span style="color: #666666; font-style: italic;">#=============================================================================</span>
&nbsp;
<span style="color: #007800;">progname</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">function</span> die <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$progname</span>: $1&quot;</span>; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #800000;">${2:-1}</span>  ; <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #007800;">VERBOSE</span>=<span style="color: #ff0000;">&quot;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> Help <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: mkfile [-v] &amp;lt;size&amp;gt;[g|k|b|m] &amp;lt;name1&amp;gt; [&amp;lt;name2&amp;gt;] ...&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  -v    Verbose&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">0</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>    <span style="color: #666666; font-style: italic;"># ----------  end of function Help  ----------</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#-----------------------------------------------------------------------</span>
<span style="color: #666666; font-style: italic;">#  Check number of command line arguments and set verbose</span>
<span style="color: #666666; font-style: italic;">#-----------------------------------------------------------------------</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-lt</span> <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
Help; die <span style="color: #ff0000;">&quot;Insufficient number of arguments&quot;</span>
<span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> = <span style="color: #ff0000;">&quot;-v&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;  <span style="color: #007800;">VERBOSE</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">shift</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">SIZE</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>kmg<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>KMG<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ; <span style="color: #7a0874; font-weight: bold;">shift</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${@}</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$file</span>&quot;</span> <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">bs</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$SIZE</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; Help <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; die <span style="color: #ff0000;">&quot;Error creating file <span style="color: #007800;">$file</span>&quot;</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>


	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/coding" title="coding" rel="tag">coding</a>, <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/scripts" title="scripts" rel="tag">scripts</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a>, <a href="http://geek.linuxman.pro.br/tag/solaris" title="solaris" rel="tag">solaris</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/codes/mkfile-for-linux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Indo além do Bash</title>
		<link>http://geek.linuxman.pro.br/geek/339</link>
		<comments>http://geek.linuxman.pro.br/geek/339#comments</comments>
		<pubDate>Fri, 11 Apr 2008 00:37:48 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/geek/339</guid>
		<description><![CDATA[Sei que sou um geek meia-boca toda vez que entra programação na parada. Quer dizer, eu me viro muito bem com shell script e fiz/faço muita coisa nervosa com Bash.  Inclusive já tirei muito barato de nego que trabalhou comigo porquê enquanto eles abriam o Eclipse (ou outro IDE que o valha) para criar um [...]]]></description>
			<content:encoded><![CDATA[<p>Sei que sou um geek meia-boca toda vez que entra programação na parada.</p>
<p>Quer dizer, eu me viro muito bem com shell script e fiz/faço muita coisa nervosa com Bash.  Inclusive já tirei muito barato de nego que trabalhou comigo porquê enquanto eles abriam o Eclipse (ou outro IDE que o valha) para criar um programa pontual, eu já estava rodando o dito cujo em shell.</p>
<p>Mas tem coisas que simplesmente forçam muito a amizade do Bash e o bichinho não tem features para resolver o problema.</p>
<p>Some isso ao fato de que na empresa Perl é largamente utilizado, diversas APIs desenvolvidas in-house estarem disponíveis e também o fato de que 4 dos 6 membros do meu time conhecerem Perl e você chega na mesma conclusão que eu: Melhor aprender <strong>Python</strong>. <img src='http://geek.linuxman.pro.br/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p style="text-align: center"><img src="http://geek.linuxman.pro.br/wp-content/uploads/2008/04/python.gif" alt="python.gif" /></p>
<p>Já comecei a brincar e hoje resolvi um problema imenso que eu tinha num dos meus scripts de auditoria.</p>
<p>O dito é feito em Bash, mas em um determinado momento ele precisa acessar alguns dispositivos via telnet e interagir com eles.</p>
<p>Usei uma gambiarra MUITO MUITO feia, com telnets encadeados com pipes, sleeps e echos de dar até medo.</p>
<p>Uma possível solução seria usar o expect, mas como eu pude verificar ele não é nada amigável e foi confirmado por diversas pessoas que é bem bugado e não digno de confiança.</p>
<p>Hoje substitui a parte feia do script por uma chamada a um script Python que passei o dia desenvolvendo e o resultado foi sensacional.</p>
<p>Certo que perdi boa parte do dia no Google, procurando exemplos de sintaxe, módulos, etc, etc. Mas isso é normal até &#8220;pegar a mão&#8221; da linguagem.</p>
<p>Aliás, fica aqui um pedido de ajuda: Alguém sabe um lugar onde eu possa achar uma lista extensiva de todos os módulos pro Python? Tipo o <a href="http://search.cpan.org">CPAN</a> (putz&#8230; dei na cara agora, hein?)</p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/bash" title="bash" rel="tag">bash</a>, <a href="http://geek.linuxman.pro.br/tag/cpan" title="cpan" rel="tag">cpan</a>, <a href="http://geek.linuxman.pro.br/tag/perl" title="perl" rel="tag">perl</a>, <a href="http://geek.linuxman.pro.br/tag/python" title="python" rel="tag">python</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/339/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AppleTV</title>
		<link>http://geek.linuxman.pro.br/geek/appletv</link>
		<comments>http://geek.linuxman.pro.br/geek/appletv#comments</comments>
		<pubDate>Sat, 15 Mar 2008 01:59:27 +0000</pubDate>
		<dc:creator>Eri</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[appletv]]></category>
		<category><![CDATA[busybox]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nova york]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://geek.linuxman.pro.br/geek/appletv</guid>
		<description><![CDATA[Como a esposa já entregou no blog dela, comprei uma AppleTV. Eu queria ter saído ileso de NY, sem comprar nada, conforme havia dito antes, mas não teve jeito. Sou um fraco. O N810 é sensacional, mas caro demais pro orçamento no momento. E um PVR montado ia sair mais caro que a AppleTV, que [...]]]></description>
			<content:encoded><![CDATA[<p>Como a <a href="http://www.sustenido.mus.br">esposa</a> já <a href="http://www.sustenido.mus.br/blog/2008/03/14/a-recompensa">entregou</a> no blog dela, comprei uma AppleTV.</p>
<p>Eu queria ter saído ileso de NY, sem comprar nada, <a href="http://geek.linuxman.pro.br/lifehacker/vivendo-uma-vida-mais-simples">conforme havia dito antes</a>, mas não teve jeito. Sou um fraco.</p>
<p>O N810 é sensacional, mas caro demais pro orçamento no momento. E um PVR montado ia sair mais caro que a AppleTV, que depois de devidamente hackeada faz <em>quase</em> a mesma coisa.</p>
<p>Já <a href="http://geek.linuxman.pro.br/geek/imac-agora-vai">fazia tempo</a> que eu estava querendo alguma coisa da Apple, mas como sou mão-de-vaca até umas horas acabei <a href="http://geek.linuxman.pro.br/geek/upgrade">ficando na linha PC tradicional mesmo</a>, lógico que estirpando o Windows e rodando Linux e a AppleTV me pareceu um bom começo.</p>
<p>Antes de comprar fiz uma pesquisa no papai Google e achei <a href="http://www.appletvhacks.net/">este site</a>, que serviu de ponte pra outros e ai minha felicidade estava completa.</p>
<p>Apesar de ser uma caixa pequena, fanless e sem interfaces comuns (aka teclado, mouse e monitor) a AppleTV nada mais é que um x86 rodando  uma versão do Darwin:</p>
<p><code>Darwin appletv.home.lan 8.8.2 Darwin Kernel Version 8.8.2: Mon Jan 29 18:57:29 PST 2007; root:xnu-792.94.18~1/RELEASE_I386 i386 i386</code></p>
<p align="center"><img src="http://geek.linuxman.pro.br/wp-content/uploads/2008/03/appletv.jpg" alt="appletv.jpg" align="right" /></p>
<p>Ai já viu, né? x86 com Unix é convite pra festa. Não vou entrar em detalhes dos hacks disponíveis, já que quem se interessar pode pesquisar, mas particularmente o que mais gostei foi suporte para codecs divx .</p>
<p>A segunda coisa que mais gostei nem sequer é hack: Suporte NFS, que é nativo no Darwin. Isso significa que minha AppleTV de 40GB tem agora 280GB de espaço:</p>
<p><code><br />
Filesystem                            Size   Used  Avail Capacity  Mounted on<br />
/dev/disk0s3                          900M   456M   435M    51%    /<br />
devfs                                  95K    95K     0B   100%    /dev<br />
fdesc                                 1.0K   1.0K     0B   100%    /dev<br />
&lt;volfs&gt;                               512K   512K     0B   100%    /.vol<br />
/dev/disk0s4                           36G   870M    35G     2%    /mnt<br />
192.168.1.104:/home/arquivos/Movies   240G    86G   155G    36%    /mnt/Scratch/Users/frontrow/remote</code></p>
<p>No começo eu estava apanhando um pouco porquê apesar de vir com bash (e não com o quebra-galho busybox) não tinha editor de texto. Mas alguma alma abençoada disponibilizou o VIM na internet. Ai fechou, né? <img src='http://geek.linuxman.pro.br/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Por enquanto assistir DVD ainda dá um pouco de trabalho, pois preciso ripar e colocar no share manualmente, mas assim que entender melhor os programas que to usando pra fazer isso (todos CLI) vou fazer um scriptzin e ai acabou.</p>
<p>A pior parte foi a integração com o iTunes (software e loja), já que o dito cujo só roda em MacOS X e Windows. Mas nada que uma máquina virtual rodando Windows XP no VMWare não tenha resolvido. Aliás, fica a dica do seamlessrdp pra quem interessar. O nome é auto-explicativo, né? <img src='http://geek.linuxman.pro.br/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Então vocês me dão licença que eu to indo ver TV, tá? <img src='http://geek.linuxman.pro.br/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>

	Tags: <a href="http://geek.linuxman.pro.br/tag/apple" title="apple" rel="tag">apple</a>, <a href="http://geek.linuxman.pro.br/tag/appletv" title="appletv" rel="tag">appletv</a>, <a href="http://geek.linuxman.pro.br/tag/busybox" title="busybox" rel="tag">busybox</a>, <a href="http://geek.linuxman.pro.br/tag/cli" title="CLI" rel="tag">CLI</a>, <a href="http://geek.linuxman.pro.br/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://geek.linuxman.pro.br/tag/nova-york" title="nova york" rel="tag">nova york</a>, <a href="http://geek.linuxman.pro.br/tag/shell" title="shell" rel="tag">shell</a>, <a href="http://geek.linuxman.pro.br/tag/vi" title="vi" rel="tag">vi</a>, <a href="http://geek.linuxman.pro.br/tag/vmware" title="vmware" rel="tag">vmware</a>, <a href="http://geek.linuxman.pro.br/tag/windows" title="windows" rel="tag">windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://geek.linuxman.pro.br/geek/appletv/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

