Archive for the ‘bash’ Category

Removing ^M’s in DOS and MAC files

tr -d ‘r’ < inputfile > outputfile

FacebookTechnotiziePlaxo PulseLinkedInTwitterWordPressGoogle BookmarksGoogle ReaderStumbleUponTechnorati FavoritesShare
Read the rest of this entry »

Various bash

# last filed zcat access.log.gz |grep 27/Jan/2008 |awk ‘{ field = $NF }; {print field}’ # count per Hits zcat access.log.gz  |grep 27/Jan/2008 |awk ‘{ field = $NF }; {print “Host: ” field } ‘ | sort |uniq -c # count per Hits + Totale al fondo cat nomefile |grep “27/Jan/2008:” |awk ‘ { field [...]

FacebookTechnotiziePlaxo PulseLinkedInTwitterWordPressGoogle BookmarksGoogle ReaderStumbleUponTechnorati FavoritesShare
Read the rest of this entry »

Count domain in mail.log (Qmail)

# cat /usr/local/sbin/count_mail_per_domain.sh #!/bin/bash logfile=$2 domain=$3 case “$1″ in -t) cat $logfile |grep “to remote” | awk ‘{print $14}’ | awk -F@ ‘{ field = $2 }; {print “domain: ” field }’ | sort |uniq -c |sort -nr | awk -v totale=0 ‘{totale=totale+$1; print ;} END {print “Totale giorno domini: “totale;}’ ;; -su) cat $logfile [...]

FacebookTechnotiziePlaxo PulseLinkedInTwitterWordPressGoogle BookmarksGoogle ReaderStumbleUponTechnorati FavoritesShare
Read the rest of this entry »
 
WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera