You are currently browsing the tag archive for the 'bash' tag.

ls -l  | awk ‘{ system(”chown -R “$3″ “$ 8) }’

//cuidado com directorios que contenham espaços doens’t work with spaces ;

find /home/ -uid 0 -exec ls -l \{\} \;

fgrep ‘gold’ /var/log/ -R | grep -i something

or regexp style search
egrep ‘(err|fail|warning)’ /var/log/* > `date +%F`.txt

ls -l  | sed -e ’s/andre/netcrash/gi’

#!/usr/bin/perl

print “hello\n”;
$dir=”/home/andre”;
if ( (!(-d $dir.”/Maildir”)) ){
`/usr/bin/maildirmake.maildrop $dir”/Maildir”`;

}

bash
[03:42:08]andre@garden:~$ for i in `seq 10`; do echo $i ; done;

Haven’t been using cut that mutch but, also a good weapon of choice.

Simple things that evolve to more complex tools :D

andre@linux-wii:~$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
103 ssh
79 cd
76 dig
71 ls
17 sudo
12 vi
12 telnet
10 ping
10 cat
8 man

:S isto é um pouco incorrecto, e depende do que tenham sido as minhas tarefas na ultima semana

Uma visão um pouco mais ampla

andre@linux-wii:~$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head -60
103 ssh
78 cd
76 dig
71 ls
17 sudo
12 vi
12 telnet
10 ping
10 cat
8 man
8 exit
7 w
7 scp
6 nmap
6 ifconfig
5 wget
5 ps
5 less
4 mv
4 mkdir
4 date
4 cp
3 mysql
3 find
3 chmod
2 vim
2 unzip
2 tar
2 ./snmpdiskio
2 rm
2 reset
2 history|awk
2 history
2 evince
2 clear

Fotos do Flickr

Mulher segura de si

Praia de Gaia

picos

lilas

flores

flor

More Photos

MyBookmarks

My Amazon.com Wish List