+ And example of length.

上级 3119f7cd
...@@ -52,7 +52,7 @@ desc: ...@@ -52,7 +52,7 @@ desc:
# Intervals can be set as random by R, e.g. range: 1-10:R. Set either random or a specified step. # Intervals can be set as random by R, e.g. range: 1-10:R. Set either random or a specified step.
# Use a file to specify a list, e.g. range: list.txt. If the file name is a relative path, it is based on the config file. # Use a file to specify a list, e.g. range: list.txt. If the file name is a relative path, it is based on the config file.
# Use {n} to repeat a element, e.g. range: user1{100},user2{100}. # Use {n} to repeat a element, e.g. range: user1{100},user2{100}.
# Use [], if intervals and elements are repeated, e.g. range: [user1,user2,user3]{100}. # Use [], if intervals and elements are repeated, e.g. range: [user1,user2,user3]{100}, [1-100]{10}.
author: zentao author: zentao
version: 1.0 version: 1.0
...@@ -83,14 +83,19 @@ fields: ...@@ -83,14 +83,19 @@ fields:
postfix: "\t" postfix: "\t"
- field: field_repeat # Use {} to define repeated elements. - field: field_repeat # Use {} to define repeated elements.
range: user-1{3},[user2,user3]{2} # user-1,user-1,user-1,user2,user3,user2,user3 range: u-1{3},[u2,u3]{2},[1-3]{3} # u-1,u-1,u-1,u2,u2,user3,user3,1,1,1,2,2,2,3,3,3
postfix: "\t" postfix: "\t"
- field: field_format # Output as formatted strings. - field: field_format # Output as formatted strings.
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。 range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" format: "passwd%02d"
postfix: "\t" postfix: "\t"
- field: field_length # Fixed length field.
range: 1-100 # 001,002,003..., 099,100
length: 3 # the length in Byte.
leftpad: 0 # Using 0 to pad.
- field: field_use_another_file # Other definition file can be referred. - field: field_use_another_file # Other definition file can be referred.
config: number_field.yaml # Refer to the definition in number_field.yaml of the current directory. config: number_field.yaml # Refer to the definition in number_field.yaml of the current directory.
postfix: "\t" postfix: "\t"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册