Great one!
How to put that nice expression into an alias without console complaining
when executed?
# ls -l | awk '{ SUM += $5 } END { print SUM }'
569047
# alias tot=ls -l | awk '{ SUM += $5 } END { print SUM }'
# tot
awk: syntax error at source line 1
context is
{ SUM +=}
awk:
On Mon, Mar 04, 2013 at 12:32:32PM +0100, Paolo Aglialoro wrote:
Great one!
How to put that nice expression into an alias without console complaining
when executed?
A shell function instead of an alias?
jirib
On Mon, Mar 04, 2013 at 12:32:32PM +0100, Paolo Aglialoro wrote:
| Great one!
| How to put that nice expression into an alias without console complaining
| when executed?
|
|
| # ls -l | awk '{ SUM += $5 } END { print SUM }'
| 569047
|
| # alias tot=ls -l | awk '{ SUM += $5 } END { print SUM }'
On Mon, Mar 04, 2013 at 12:54:49PM +0100, Paul de Weerd wrote:
On Mon, Mar 04, 2013 at 12:32:32PM +0100, Paolo Aglialoro wrote:
| Great one!
| How to put that nice expression into an alias without console complaining
| when executed?
|
|
| # ls -l | awk '{ SUM += $5 } END { print SUM }'
On Mon, Mar 04, 2013 at 12:57:05PM +0100, Otto Moerbeek wrote:
| On Mon, Mar 04, 2013 at 12:54:49PM +0100, Paul de Weerd wrote:
|
| On Mon, Mar 04, 2013 at 12:32:32PM +0100, Paolo Aglialoro wrote:
| | Great one!
| | How to put that nice expression into an alias without console complaining
| |
At 2013-03-04 20:13:46,Paul de Weerd we...@weirdnet.nl wrote:
Exactly! So what is the point in summing up the sizes of a bunch of
files ? I am 197 cm tall, my house number is 34, my zipcode is 1318,
I have 2 brothers and 1 sister .. sum is 1552. Great, but now what ?
This total value does not
On 4 Mar 2013, at 10:02, f5b wrote:
Maybe because we come from Windows system.
In Windows, sum files' size by Byte is a simple quick way to check if
thousands of files are
modified/sync/same, although not accurate.
openssl {md5|sha1|...} *
On Mon, Mar 04, 2013 at 11:02:47PM +0800, f5b wrote:
At??2013-03-04??20:13:46,Paul??de??Weerd??we...@weirdnet.nl??wrote:
Exactly!So??what??is??the??point??in??summing??up??the??sizes??of??a??bunch??of
files???I??am??197??cm??tall,??my??house??number??is??34,??my??zipcode??is??1318,
On Mon, Mar 04, 2013 at 12:54, Paul de Weerd wrote:
On Mon, Mar 04, 2013 at 12:32:32PM +0100, Paolo Aglialoro wrote:
| Great one!
| How to put that nice expression into an alias without console complaining
| when executed?
I may be an oddball here, but I prefer just making little shell
Or with subdirectories
find . -type f -ls | awk '{sum += $7} END {print sum}'
for example
1.
there is only two file in /home/test/
# ls -l /home/test/
total 8
-rw-r--r-- 1 root wheel 2 Mar 3 23:29 a.txt
-rw-r--r-- 1 root wheel 3 Mar 3 23:29 b.txt
So the total size of all files ( a.txt + b.txt ) should be 5 Bytes.
How to get total size ( 5 Bytes ) directly but not
Not really an answer to your question, I know, but what would such a
number mean ? What use do you have for it ?
On Mon, Mar 04, 2013 at 12:01:25AM +0800, f5b wrote:
| for example
|
| 1.
| there is only two file in /home/test/
| # ls -l /home/test/
| total 8
| -rw-r--r-- 1 root wheel 2 Mar
On Sun, Mar 03, 2013 at 22:02, Paul de Weerd wrote:
[weerd@despair] $ ls -l /tmp/test/* | awk '{SUM+=$5} END {print SUM}'
heh. :)
~/bin cat filesizes
#!/bin/sh
ls -l $@ | awk '{sum += $5} END { print sum }'
13 matches
Mail list logo