<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-20040501</id><updated>2012-01-18T08:54:15.627Z</updated><category term='script'/><category term='bash'/><title type='text'>unix art</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20040501.post-3095630511194880263</id><published>2008-05-04T18:35:00.005Z</published><updated>2011-05-26T13:10:29.646Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Vigenère cipher in pure bash</title><summary type='text'>#!/usr/local/bin/bash
# vigenere.sh
# http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher

a="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

[[ "${*/-d/}" != "" ]] &amp;&amp;
echo "Usage: $0 [-d]" &amp;&amp; exit 1
m=${1:+-}

printf "string: ";read t
printf "keyphrase: ";read -s k
printf "\n"
for ((i=0;i&lt;${#t};i++)); do
p1=${a%%${t:$i:1}*}
p2=${a%%${k:$((i%${#k})):1}*}
d="${d}${a:$(((${#p1}${m:-+}${#p2})%${#a})):1}"
done
echo "$d"
</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/3095630511194880263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=3095630511194880263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/3095630511194880263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/3095630511194880263'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2008/05/vigenre-cipher-in-pure-bash.html' title='Vigenère cipher in pure bash'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-227770825140862698</id><published>2007-10-15T06:03:00.002Z</published><updated>2011-05-26T12:17:20.213Z</updated><title type='text'>find fastest mirror</title><summary type='text'>#!/bin/bash
# ffmirror.sh
# find fastest mirror (?!?)
# give it a list of hosts and it will sort them
# according to their response time
# no switches (ATM) just ./ffmirror&lt;mirrors.txt
# www.foo.org or http://www.foo.org or
# http://foo.org/page or ...

trap 'printf "\ncaught signal\nGot only ${#slist[@]}\n" &amp;&amp;
printf "%s\n" "${slist[@]}" &amp;&amp; exit 1' 2

while read line; do
# get host &amp; page
line=$</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/227770825140862698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=227770825140862698' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/227770825140862698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/227770825140862698'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2007/10/find-fastest-mirror.html' title='find fastest mirror'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-4187103486789795571</id><published>2007-07-02T12:09:00.001Z</published><updated>2011-05-26T12:27:16.696Z</updated><title type='text'>Calculate check digit for EAN-13 barcodes</title><summary type='text'>[inode@brio ~]$ cat chkdigit.sh
#!/usr/local/bin/bash
# http://en.wikipedia.org/wiki/European_Article_Number
oe="13"
while read line; do
for (( j=0; j&lt;${#line}; j++ )); do
chk=$((chk+${line:$j:1}*${oe:$j%2:1}))
done
[[ $((chk%10)) == 0 ]] &amp;&amp; digit=0 || digit=$((10-chk%10))
chk=0
echo ${line}${digit}
done

[inode@brio ~]$ cat barcodes.txt
068886641760
200020400298
200020400303
200020400323
</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/4187103486789795571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=4187103486789795571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/4187103486789795571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/4187103486789795571'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2007/07/calculate-check-digit-for-ean-13.html' title='Calculate check digit for EAN-13 barcodes'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-6098622026638655908</id><published>2007-05-07T20:33:00.001Z</published><updated>2011-05-26T12:28:38.070Z</updated><title type='text'>cleansh!t</title><summary type='text'>#!/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # Clean Sh!t v0.1 # # # # # # # # # # # # # # # #
# # # # # # Date: '20070506'# # # # # # # # # # # # # # # #
# # # # # # j00 @r3 ! fr33 to c0py my c0d3! # # # # # # # #
a="5422437\
";b="while\
readl;doec\
ho\$l;done\
&lt;\$0";d=0;\
for ((i=0;\
i&lt;${#a};i+\
+));do c[$\
i]=${b:$d:\
${a:$i:1}}\
;d=$((d+${\
a:$i:1}));\
</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/6098622026638655908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=6098622026638655908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/6098622026638655908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/6098622026638655908'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2007/05/cleansht.html' title='cleansh!t'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114247081976382344</id><published>2006-03-16T00:36:00.001Z</published><updated>2011-05-26T12:29:00.939Z</updated><title type='text'>Generate Morse Code from ASCII</title><summary type='text'>The Morse code, named after its inventor Samuel Morse, was used for long distance communication.
It is largely believed that it is now obsolete, yet some prisoners still find it useful. (banging a shoe on a pipe)
Learn more about it at Wikipedia.

Anyway here is the script
#!/bin/bash
# morse.sh - generate morse code from ascii
# you can contact me at:
# --. .-. ..- .-.. --- ... .--.-. --. -- .- </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114247081976382344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114247081976382344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114247081976382344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114247081976382344'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/03/generate-morse-code-from-ascii.html' title='Generate Morse Code from ASCII'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114207663576226882</id><published>2006-03-11T11:03:00.001Z</published><updated>2011-05-26T12:29:13.404Z</updated><title type='text'>HTTP authentication, base64 encoding</title><summary type='text'>In the previous post  dyndee.sh - dyndns update client, I faced a problem: I had to authenticate to dyndns.org but didn't want to use lynx, links or any other external tool.
For HTTP authentication to work I need to base64 encode the string "username:password"
I will try to explain each step.


First I had to get the decimal value of each character of the string. I couldn't find any function to </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114207663576226882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114207663576226882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114207663576226882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114207663576226882'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/03/http-authentication-base64-encoding.html' title='HTTP authentication, base64 encoding'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114106484072518278</id><published>2006-02-27T16:47:00.001Z</published><updated>2011-05-26T12:30:46.946Z</updated><title type='text'>dyndee.sh - dyndns update client</title><summary type='text'>Just a minimalistic dyndns.org update client written entirely in bash.
The only requirement is that bash should be compiled with --enable-net-redirections which on many systems is by default.

It gets the ip from http://metawire.org/~inode/ip.php which is a simple 
&lt;?php echo $_SERVER['REMOTE_ADDR']; ?&gt; 

It can be modified to use others such as checkip.dyndns.org
If you find any bug or have any </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114106484072518278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114106484072518278' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114106484072518278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114106484072518278'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/dyndeesh-dyndns-update-client.html' title='dyndee.sh - dyndns update client'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114083814232716468</id><published>2006-02-25T02:21:00.001Z</published><updated>2011-05-26T12:31:23.653Z</updated><title type='text'>substrings, brace expansion, sequence expressions</title><summary type='text'>Let's say you have a set of files in a directory named like
exp1eve1.txt
exp1eve2.txt
exp1eve3.txt
exp1eve4.txt 
and you want to change the exp1 part to exp2 so they become
exp2eve1.txt
exp2eve2.txt
...


There are so many ways to do the job.
Using substring expansion one could do
#!/bin/bash
for i in exp1eve*.txt; do
mv "$i" "${i:0:3}2${i:4:$((${#i}-3))}"
done
How does the substring expansion </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114083814232716468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114083814232716468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114083814232716468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114083814232716468'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/substrings-brace-expansion-sequence.html' title='substrings, brace expansion, sequence expressions'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114076661240970259</id><published>2006-02-24T06:59:00.001Z</published><updated>2011-05-26T12:31:51.157Z</updated><title type='text'>ebook: The Complete FreeBSD released!</title><summary type='text'>Greg Lehey, a kernel hacker specializing in BSD UNIX, decided to release his book "The Complete FreeBSD" under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.


From TOC:
1. Introduction
2. Before you install
3. Quick installation
4. Shared OS intallation
5. Installing FreeBSD
6. Post-installation configuration
7. The tools of the trade
8. Taking control
9. The Ports </summary><link rel='related' href='http://www.lemis.com/grog/Documentation/CFBSD/' title='ebook: The Complete FreeBSD released!'/><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114076661240970259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114076661240970259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114076661240970259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114076661240970259'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/ebook-complete-freebsd-released.html' title='ebook: The Complete FreeBSD released!'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114054041408865299</id><published>2006-02-21T16:18:00.001Z</published><updated>2011-05-26T12:34:11.340Z</updated><title type='text'>Microsoft: How to Remove Linux and Install Windows XP</title><summary type='text'>No free space left for MS Windows?

"This article explains how to remove the Linux operating system from your computer and install Windows XP.
 This article assumes that Linux is already installed on your computer's hard disk, that Linux native and Linux swap partitions are in use (which are incompatible with Windows XP), and that there is no free space left on the hard disk."

priceless..</summary><link rel='related' href='http://support.microsoft.com/kb/314458/EN-US/' title='Microsoft: How to Remove Linux and Install Windows XP'/><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114054041408865299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114054041408865299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114054041408865299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114054041408865299'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/microsoft-how-to-remove-linux-and.html' title='Microsoft: How to Remove Linux and Install Windows XP'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114051294477471826</id><published>2006-02-21T08:37:00.001Z</published><updated>2011-05-26T12:34:42.390Z</updated><title type='text'>BASH_REMATCH, regular expressions</title><summary type='text'>Since version 3, bash has an additional binary operator `=~' which is able to handle regular expressions. Every substring which is matched by the subexpression which is in parenthesis can be accessed from the BASH_REMATCH variable.

Here is a small script i use to get the latest freshmeat releases
#!/bin/bash
exec 4&lt;&gt;/dev/tcp/rss.freshmeat.net/80
printf "%s\n" "GET /freshmeat/feeds/</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114051294477471826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114051294477471826' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114051294477471826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114051294477471826'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/bashrematch-regular-expressions.html' title='BASH_REMATCH, regular expressions'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-114012822457547328</id><published>2006-02-16T22:03:00.000Z</published><updated>2006-02-16T22:17:11.516Z</updated><title type='text'>changed blog template</title><summary type='text'>I changed the design a bit. I hope you like it. It looks ok on firefox, konqueror, lynx, links. If you have some other browser and if you are kind enough to send in some feedback, please do so :)</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/114012822457547328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=114012822457547328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114012822457547328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/114012822457547328'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/changed-blog-template.html' title='changed blog template'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113988930087259040</id><published>2006-02-14T02:51:00.000Z</published><updated>2006-02-14T03:55:05.943Z</updated><title type='text'>rarcrack.sh: crack those rar files</title><summary type='text'>There are times when you just "forget" that rar passwordfirst get unrar from http://www.rarlab.com/rar/unrarsrc-3.3.4.tar.gzand the scriptjust change wordlist and unrar paths and run it./rarcrack file.rar#!/bin/bashwordfile=/usr/share/dict/wordsxrar=/usr/bin/unrar[ -x "$xrar" ] || exit 1[ -r "$wordfile" ] || exit 1[ -r "$1" ] || exit 1trap 'printf "\n%s\n" "caught signal" &amp;&amp; exit 1' 2try=('|' '/'</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113988930087259040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113988930087259040' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113988930087259040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113988930087259040'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/rarcracksh-crack-those-rar-files.html' title='rarcrack.sh: crack those rar files'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113935650305631194</id><published>2006-02-07T23:06:00.000Z</published><updated>2006-02-07T23:55:03.086Z</updated><title type='text'>Amazon sells Linux OS as DOS</title><summary type='text'>Well Slackware 3.6 (released in 1998) is a bit old. There is nothing wrong with selling some old distro. 10 quid is a bit too much, but what the heck.. it comes in a nice package. So i guess that's ok too.JUST DON'T SELL SLACKWARE AS DOSI guess their point of view is: Linux-&gt;command line-&gt;DOSSo there you go "Platform: DOS"click on the image to see for yourself</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113935650305631194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113935650305631194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113935650305631194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113935650305631194'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/amazon-sells-linux-os-as-dos.html' title='Amazon sells Linux OS as DOS'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113926992373182491</id><published>2006-02-06T12:15:00.000Z</published><updated>2006-03-05T10:42:38.683Z</updated><title type='text'>shell script: getmillist.sh: get that milw0rm wordlist</title><summary type='text'>*edit* 20060226 This script is useless.Thanks to Rob for mentioning it, you can get the updated list of cracked hashes directly from milw0rmjust an ugly hack to get that milw0rm listno need to run it again.. grab the list here#!/bin/bashecho "lets get that milw0rm list :)"for ((i=8990; 0 &lt; i; i=i-30)) do   links -dump "http://www.milw0rm.org/md5/list.php?start=$i"|   grep cracked|while read -a </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113926992373182491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113926992373182491' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113926992373182491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113926992373182491'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/shell-script-getmillistsh-get-that.html' title='shell script: getmillist.sh: get that milw0rm wordlist'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113919751904689331</id><published>2006-02-06T03:37:00.000Z</published><updated>2006-02-06T03:45:19.060Z</updated><title type='text'>shell tip: dealing with weird filenames</title><summary type='text'>I know its frustrating. Thank god there is the end of options list.-bash-3.00$ cd -=test=-                # nope-bash: cd: -=: invalid optioncd: usage: cd [-L|-P] [dir]-bash-3.00$ cd "-=test=-"              # nope-bash: cd: -=: invalid optioncd: usage: cd [-L|-P] [dir]-bash-3.00$ cd '-=test=-'              # nope-bash: cd: -=: invalid optioncd: usage: cd [-L|-P] [dir]-bash-3.00$ cd \-\=test\=\-</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113919751904689331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113919751904689331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113919751904689331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113919751904689331'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/shell-tip-dealing-with-weird-filenames.html' title='shell tip: dealing with weird filenames'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113887327410273293</id><published>2006-02-02T09:35:00.000Z</published><updated>2006-02-02T09:41:14.113Z</updated><title type='text'>script: massping.sh: mass ping scanner</title><summary type='text'>pretty fasti know.. some ranges are not valid. More checking needs to be done#!/bin/bash## ./shping.sh 192.168.0.1-150function usage() {   echo "usage example: $0 192.168.0.1-100"   exit 1}IFS='.'iprange=($@)               # 192 168 0 1-100IFS=$'\040\t\n'            # printf "$IFS"|hexdump -bcsrange=${iprange[3]/%-*/}  # 1erange=${iprange[3]/#*-/}  # 100j=0# Do some checking[ "$#" == "1" ]</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113887327410273293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113887327410273293' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113887327410273293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113887327410273293'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/script-masspingsh-mass-ping-scanner.html' title='script: massping.sh: mass ping scanner'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113887165754553947</id><published>2006-02-02T09:07:00.000Z</published><updated>2006-02-02T09:14:17.556Z</updated><title type='text'>script: expect.sh: using bash instead of expect</title><summary type='text'>because i hate expect scriptingtry this:#!/bin/bashexpect=("hi" "white" "in")reply=("hello" "black" "out")while read -n1 "char"; do   word="$word$char"   [ "$word" == "${expect[$count]:0:${#word}}" ] || word="$char"      if [ "$word" == "${expect[$count]}" ]; then         printf "\n${reply[$count]}\n"         (( count++ ))         [ "$count" == "${#expect[@]}" ] &amp;&amp; break         word=""      </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113887165754553947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113887165754553947' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113887165754553947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113887165754553947'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/02/script-expectsh-using-bash-instead-of.html' title='script: expect.sh: using bash instead of expect'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113873840044040799</id><published>2006-01-31T19:47:00.000Z</published><updated>2006-01-31T20:19:41.466Z</updated><title type='text'>script: uptime.sh: get uptime from /proc/uptime</title><summary type='text'>Just a simple script to get uptime from /proc/uptime (which is in seconds)#!/bin/bash# uptime.sh# get uptime from /proc/uptimeuptime=$(&amp;lt/proc/uptime)uptime=${uptime%%.*}seconds=$(( uptime%60 ))minutes=$(( uptime/60%60 ))hours=$(( uptime/60/60%24 ))days=$(( uptime/60/60/24 ))echo "$days days, $hours hours, $minutes minutes, $seconds seconds"Ofcourse in the same way you could add months, years, </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113873840044040799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113873840044040799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113873840044040799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113873840044040799'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/script-uptimesh-get-uptime-from.html' title='script: uptime.sh: get uptime from /proc/uptime'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113854535120799161</id><published>2006-01-29T14:21:00.000Z</published><updated>2006-01-29T14:35:51.233Z</updated><title type='text'>script: renumdir.sh: rename dirs to sequentially numbered ones</title><summary type='text'>#!/bin/bash## renumdir.sh: renames dirs to sequentially# numbered ones starting from 00001 # ex. 00001 00002 00003 00004 etc.## questions? suggestions? comments?# grulosΨgmail.com#cd $1 || exit 1typeset -a files=(*)typeset -i j=1for i in "${files[@]}"; do   if [ -d "$i" ]; then   # infinite loop until we find the next   # numbered dir we are going to use      while true; do         fname=0000$j;</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113854535120799161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113854535120799161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113854535120799161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113854535120799161'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/script-renumdirsh-rename-dirs-to.html' title='script: renumdir.sh: rename dirs to sequentially numbered ones'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113849803530609073</id><published>2006-01-29T00:55:00.000Z</published><updated>2006-01-29T01:27:19.230Z</updated><title type='text'>shell tip: echo * and printf</title><summary type='text'>~$ mkdir testdir~$ cd testdir~/testdir$ touch -- -e \\141~/testdir$ ls-e  \\141~/testdir$ echo *a~/testdir$ note i used '--' with touch so '-e' would not be used as an option.So what happened here?-e was passed to echo as an option. echo * becomes echo '-e' '\141' which interpreted correctly the \141 escape sequence as 'a'If you're going to use * be careful. Avoid echo try printf.In this case: ~/</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113849803530609073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113849803530609073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113849803530609073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113849803530609073'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/shell-tip-echo-and-printf.html' title='shell tip: echo * and printf'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113848779085566566</id><published>2006-01-28T22:31:00.000Z</published><updated>2006-01-28T22:36:30.926Z</updated><title type='text'>shell tip: get parts of a filename</title><summary type='text'># works in bash, zsh and ksh93~$ f=file.tar.bz2~$ echo "${f##*.}"bz2~$ echo "${f#*.}"tar.bz2~$ echo "${f%.*}"file.tar~$ echo "${f%%.*}"file</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113848779085566566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113848779085566566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113848779085566566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113848779085566566'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/shell-tip-get-parts-of-filename.html' title='shell tip: get parts of a filename'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113838733104448137</id><published>2006-01-27T18:36:00.000Z</published><updated>2006-01-27T18:42:11.066Z</updated><title type='text'>shell tip: var of var</title><summary type='text'>~$ a=1~$ b=a~$ echo $((b))1</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113838733104448137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113838733104448137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113838733104448137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113838733104448137'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/shell-tip-var-of-var.html' title='shell tip: var of var'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113833610845299093</id><published>2006-01-27T04:22:00.000Z</published><updated>2006-01-27T04:28:28.463Z</updated><title type='text'>password cracker John the Ripper v1.7 released</title><summary type='text'>http://www.openwall.com/john/~/john-1.7/doc$ cat CHANGESThe following major changes have been made since John 1.6:* Bitslice DES code for x86 with MMX: more than twice faster than oldernon-bitslice MMX code.* Bitsliced the LM hash code as well: now several times faster.* Significant improvements to the generic bitslice DES code: +20% on RISC.* PowerPC G4+ AltiVec support (Mac OS X and Linux): </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113833610845299093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113833610845299093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113833610845299093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113833610845299093'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/password-cracker-john-ripper-v17.html' title='password cracker John the Ripper v1.7 released'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113833479486757129</id><published>2006-01-27T03:55:00.000Z</published><updated>2006-01-27T04:06:34.883Z</updated><title type='text'>GPL v3, Linus Torvalds "Conversion isn't going to happen."</title><summary type='text'>"The Linux kernel is under the GPL version 2. Not anything else. Someindividual files are licenceable under v3, but not the kernel in general.""And quite frankly, I don't see that changing. I think it's insane torequire people to make their private signing keys available, for example.I wouldn't do it. So I don't think the GPL v3 conversion is going tohappen for the kernel, since I personally </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113833479486757129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113833479486757129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113833479486757129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113833479486757129'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/gpl-v3-linus-torvalds-conversion-isnt.html' title='GPL v3, Linus Torvalds &quot;Conversion isn&apos;t going to happen.&quot;'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113703190532233563</id><published>2006-01-12T02:05:00.000Z</published><updated>2006-01-12T02:13:06.256Z</updated><title type='text'>Why save $IFS to OIFS ?</title><summary type='text'>A lot of people seem to get confused just because $IFS contains non printing characters. Many suggest that before changing IFS (while using a modern shell) it should be saved in a variable such as OIFS. Others suggest going into a subshell so the original IFS won'be changed. Looking at IFS as it is by default on my system it's just space tab and newline~$ echo -En "$IFS"|hexdump -bc0000000 040 </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113703190532233563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113703190532233563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113703190532233563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113703190532233563'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/why-save-ifs-to-oifs.html' title='Why save $IFS to OIFS ?'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113694467615649640</id><published>2006-01-11T01:22:00.000Z</published><updated>2006-01-11T01:57:57.386Z</updated><title type='text'>1 pixel for $1.000.001 --a true bargain</title><summary type='text'>No it's not a dead pixel dummy. It's the new trend everyone is talking about. It seems that everyone is gone crazy selling pixels. So here you go I bet I can make more than a million a lot faster and a lot easier than Alex Tew.The pixel has a hex value of "#ffff33"Believe me this pixel will remain in history. (once you buy it)</summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113694467615649640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113694467615649640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113694467615649640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113694467615649640'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/1-pixel-for-1000001-true-bargain.html' title='1 pixel for $1.000.001 --a true bargain'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20040501.post-113679482089325134</id><published>2006-01-09T08:09:00.000Z</published><updated>2006-01-11T02:47:41.596Z</updated><title type='text'>free shell with all the bells and whistles</title><summary type='text'>metawire.org --I've been there for over a yearSome of the things that might interest you:OS: OpenBSDquota: 25MBprogramming/scripting: gas, gcc, perl, python, rubyshells: sh, csh, ksh, bash, zsh, tcshirc: epic, BitchX, irssiicq: centericqmail: pine, muttwww: php, postgresqlweb: lynx, linkseditors: vi, emacs, picoand that's just for users1. After a few months of 'good behavior', being a positive </summary><link rel='replies' type='application/atom+xml' href='http://grulos.blogspot.com/feeds/113679482089325134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20040501&amp;postID=113679482089325134' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113679482089325134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20040501/posts/default/113679482089325134'/><link rel='alternate' type='text/html' href='http://grulos.blogspot.com/2006/01/free-shell-with-all-bells-and-whistles.html' title='free shell with all the bells and whistles'/><author><name>o foufoutos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
