[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Unix 101: ls with file count



>Chain commands in an alias:
>alias dols="ls; echo `ls -l | grep ^d | wc -l` directories; echo `ls -l |
grep ^- | wc -l` files"
>customize as needed

If you're wondering why you copied and pasted this in it didn't work but
just constantly showed you the stats for the directory you were in when you
executed it, then make sure you replaced the " (double quotes) with '
(single quotes).  Otherwise your shell will expand the stuff in between the
` ` rather than taking it literally (in general, " means everything in here
is a string, but expand what you can whilst ' means everything in here is a
string, don't expand anything).

-i
ianw@ieee.org
http://www.wienand.org


**********************************************************************
CAUTION: This message may contain confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message, any use or disclosure of this message is prohibited.  If you received this message in error please notify Mail Administrators immediately.  You must obtain all necessary intellectual property clearances before doing anything other than displaying this message on your monitor.  There is no intellectual property licence.  Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Woolworths Ltd.
**********************************************************************


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: