home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!cs.utexas.edu!usc!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!unidui!hm342st
- From: hm342st@unidui.uni-duisburg.de (Michael Staats)
- Subject: Re: Simple AWK question.....
- References: <l96frkINNsom@phad.hsc.usc.edu>
- Date: 20 Aug 92 10:19:26 GMT
- Organization: Rechenzentrum Uni-Duisburg
- Message-ID: <hm342st.714305966@unidui>
- Lines: 28
-
- In <l96frkINNsom@phad.hsc.usc.edu> rpinder@phad.hsc.usc.edu (Rich Pinder) writes:
-
- >I'd like to reference the environment variable PWD inside an awk script. I
- >wrote the following simple script to sum bytes in any given directory, and
- >would like the output to say: Total Bytes in /usr/lib: 1024000 (1 MB).
-
- >Thanks for you help
-
-
- >......................
-
- ># sums directory bytes (BSD)
-
- What about
-
- $ echo Total kbytes in $PWD: `du -s .`
-
- This works under AIX 3.1.5 with ksh and I hope under other BSD like OS, too.
- Under SYS V like OS you'll get twice the amount of kB, which is weird,
- but ...
-
- So long
- Michael
- --
- Michael Staats
- Theoretische Tieftemperaturphysik
- Universitaet Gesamthochschule Duisburg
- michael@hal9000.uni-duisburg.de
-