shpeedy
Joined 6 years ago
Karma
17
Submissions
21
Member since
Jan 13
Joined 6 years ago
1. Kill solarmist (it's good starting point).
Generally, the order of magnitude of a number is the smallest power of 10 used to represent that number.[2] To work out the order of magnitude of a number N, the number is first expressed in the following form:
N = a × 10^b
where 1/sqrt(10) ≤ a < sqrt(10) . Then, b represents the order of magnitude of the number.Why you use awk?
[0]: http://rc3.org/2014/08/28/surprisingly-perl-outperforms-sed-...
$ perl --help
...
-F/pattern/ split() pattern for -a switch (//'s are optional)
-l[octal] enable line ending processing, specifies line terminator
-a autosplit mode with -n or -p (splits $_ into @F)
-n assume "while (<>) { ... }" loop around program
-p assume loop like -n but print line also, like sed
-e program one line of program (several -e's allowed, omit programfile)
Example. List file name and size: ls -l | perl -ae 'print "@F[8..$#F], $F[4]"'