Re: [ssfr] Re: [SSFR] Partage de fonctions ...

[ Thread Index | Date Index | More debianworld.org/shellscript-fr Archives ]


On Fri, Apr 25, 2008 at 05:58:38PM +0200, Marc Chantreux wrote:
> lls() {
>     ls -ogrA --time-style="+" $* |
> 	awk -v min=${min:-4} '
> 	    NF > 3 && /^[^d]/ { 
> 		s=$3/1024;
> 		$1="";
> 		$2="";
> 		$3="";
> 		if (s>min)
> 		    printf "%12.2f\t%s\n", s, $0;
> 	    }
> 	' |
> 	sort -n
> } 

lls () {
    if [ "$@" ]; then
	find "$@" -prune -type f -size ${size:-+4k} -printf "%s %p\n" 
    else
	find . -prune -type f -size ${size:-+4k} -printf "%s %p\n" 
    fi 
}

ca fait la meme chose, non? 
sauf qu'en plus tu peux ecrire:

size=+100M lls tmp/*odt
size=-10K lls tmp/*jpeg

-- 
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com

---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/