makedbm.8yp

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 8YP 代码 · 共 136 行

8YP
136
字号
.\" SCCSID: @(#)makedbm.8yp	8.1	9/11/90.TH makedbm 8yp.SH Namemakedbm \- make a yellow pages dbm file.SH Syntax.B makedbm[.B \-i.I yp_input_file ] [.B \-o.I yp_output_name ] [.B \-d.I yp_domain_name ] [.B \-m.I yp_master_name ] .I infile .I outfile.br.B makedbm[.B \-u.I dbmfilename ].SH Description.NXR "makedbm command".NXA "makedbm command" "yppush command".NXAM "makedbm command" "dbm file".NXAM "dbm keyword" "makedbm command"The .PN makedbmcommand takes the file specified by the argument.I infileand converts it to a pair of files in.MS dbm 3xformat, namely .PN outfile.pagand .PN outfile.dir .Each line of the input file is converted to a single.PN dbmrecord.All characters up to the first tab or space form the key,and the rest of the line is defined as the key's associated data.If a line ends with a backslash (\\),the data for that record is continued onto the next line.It is left for the clients of the yellow pages to interpret the number sign (#); .PN makedbmdoes not treat it as a comment character.  The.I infileparameter can be a hyphen (-), in which case.PN makedbmreads the standard input..PPThe.PN makedbmcommand is meant to be used in generating.PN dbmfiles for the yellow pages service.The .PN makedbmcommand generates a special entry with the key  yp_last_modified,which is the date of.I infile..SH Options.TP.B \-iCreate a special entry with the key yp_input_file..TP.B \-oCreate a special entry with the key yp_output_name..TP.B \-dCreate a special entry with the key yp_domain_name..TP.B \-mCreate a special entry with the key yp_master_name.  If no master host name is specified, yp_master_name will be set to the local host name..TP.B \-uUndo a.PN dbmfile.That is, print out a.PN dbmfile one entry per line,with a single space separating keys from values..SH ExamplesThe following example shows how a combination of commands can be usedto make the yellow pages .PN dbm files .PN passwd.byname.pagand .PN passwd.byname.dir from the .PN /etc/passwd file.  The percent sign (%) signifies the system prompt..PP.EX% awk 'BEGIN { FS = ":"; OFS = "\t"; }  { print $1, $0 }' /etc/passwd > ptmp% makedbm ptmp passwd.byname% rm ptmp.EE.PPThe .PN awkcommand creates the file .I ptmpwhich is in a form usable by.PN makedbm .The .PN makedbm command uses the.I ptmp file to create the yellow pages dbm files .PN passwd.byname.dirand .PN passwd.byname.pag .The .PN rmcommand removes the .I ptmpfile..SH See Alsoyppasswd(1yp), dbm(3x), ypmake(8yp)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?