- 论坛徽章:
- 4
|
本帖最后由 johnson0418 于 2016-03-16 22:51 编辑
回复 4# haooooaaa
users>more dd
awk -vRS= -F=' *\\(' -vs='ChargedNumber CalledNumber CallType StartDateTime EndDateTi
me Duration TrunkGroupIdentity' 'BEGIN{p=split(s,t," *");print s}a!=FILENAME{if(a)print m
;a=FILENAME}{for(i=1;i<=p;i++){if(match($0,t" = ([^(\n]+)",n)){sub(" *$","",n[1]);printf "%-20 s",n[1]}}}' *
users>./dd
awk: cmd. line:1: fatal: match() cannot have 3 arguments
awk: option requires an argument -- W
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options:
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
-m[fr] val
-W compat --compat
-W copyleft --copyleft
-W copyright --copyright
-W help --help
-W lint --lint
-W lint-old --lint-old
-W posix --posix
-W re-interval --re-interval
-W source=program-text --source=program-text
-W traditional --traditional
-W usage --usage
-W version --version
To report bugs, see node `Bugs' in `gawk.info', which
is section `Reporting Problems and Bugs' in the
printed version.
(1)xa000000> awk --version
GNU Awk 3.0.6
Copyright (C) 1989, 1991-2000 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|