LINUX sed基本用法

本文深入讲解SED文本处理工具的使用技巧,包括p、d、s等命令的实践应用,结合正则表达式完成文本的精确编辑,如字符替换、行删除与输出等高级操作。

问题
本案例要求熟悉sed命令的p、d、s等常见操作,并结合正则表达式,完成以下任务:
删除文件中每行的第二个、最后一个字符
删除文件中每行的第二个、最后一个单词
将文件中每行的第一个、第二个字符互换
将文件中每行的第一个、第二个单词互换
删除文件中所有的数字、行首的空格
为文件中每个大写字母添加括号
方案
sed文本处理工具的用法:

用法1:前置命令 | sed  [选项]  '编辑指令'
用法2:sed  [选项]  '编辑指令'  文件.. ..

相关说明如下:
其中,“编辑指令”用来实现过滤操作,由“[定址符]处理动作”组成
而“定址符”用来定义需要操作的文本,由“[地址1 [,地址2]]组成,地址1为起始位置,地址2为结束位置
未指定“定址符”时,默认处理所有文本
只指定地址1时,只处理与地址1相匹配的文本
步骤
实现此案例需要按照如下步骤进行。
步骤一:认识sed工具的基本选项
1)sed命令的 -n 选项
执行p打印等过滤操作时,希望看到的是符合条件的文本。但不使用任何选项时,默认会将原始文本一并输出,从而干扰过滤效果。比如,尝试用sed输出/etc/rc.local的第1行:

[root@svr5 ~]# sed '1p' /etc/rc.local
#!/bin/sh
#
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

可以发现所有的行都被显示出来了。—— 正确的用法应该添加 -n 选项,这样就可以只显示第1行了:

[root@svr5 ~]# sed -n '1p' /etc/rc.local
#!/bin/s

而在执行d删除等过滤操作时,希望看到的是删除符合条件的文本之后还能够被保留下来的文本,所以这时候就不应该使用 -n 选项了。比如,删除/etc/rc.local文件的第1-4行文本:

[root@svr5 ~]# sed '1,4d' /etc/rc.local
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

2)sed命令的 -i 选项
正常情况下,sed命令所做的处理只是把操作结果(包括打印、删除等)输出到当前终端屏幕,而并不会对原始文件做任何更改:

[root@svr5 ~]# cp /etc/rc.local rclocal.txt  	//复制为新文件,用作测试
[root@svr5 ~]# cat rclocal.txt  				//确认测试文件内容
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
[root@svr5 ~]# sed '1,4d' rclocal.txt  			//删除第1~4行,输出结果
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
[root@svr5 ~]# cat rclocal.txt  				//查看原始文本,并未改动
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

若希望直接修改文件内容,应添加选项 -i 。
比如,直接删除rcloal.txt文件的第1~4行,不输出结果:

[root@svr5 ~]# sed -i '1,4d' rclocal.txt    		//删除操作
[root@svr5 ~]# cat rclocal.txt  					//确认删除结果
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

下文中关于使用sed修改文件的示例中,为了避免大家在练习过程中因误操作导致系统故障,部分命令省略 –i 选项,不再逐一说明。需要时,大家可自行加上此选项。
3)sed命令的 -e 选项
选项 -e 用来指定一条“编辑指令”,实际上 -e 通常是被省略了;当需要执行多条编辑指令时,可添加多组 -e 操作。比如,输入/etc/rc.local文件的第1行、第4行,可以采用这种方式:

[root@svr5 ~]# sed -n -e '1p' -e '4p' /etc/rc.local
#!/bin/sh
# You can put your own initialization stuff in here if you don't

如果不使用 -e ,也可以用分号来隔离多个操作(如果有定址条件,则应该使用{ }括起来),比如:

[root@svr5 ~]# sed -n '1p;4p' /etc/rc.local
#!/bin/sh
# You can put your own initialization stuff in here if you don't

或者:

[root@svr5 ~]# sed -n '{1p;4p}' /etc/rc.local
#!/bin/sh
# You can put your own initialization stuff in here if you don't

步骤二:认识sed工具的p输出操作
先创建一个练习用的测试文件,每一行之前添加行号,方便练习时查看效果:

[root@svr5 ~]# cat -n /etc/rc.local > rclocal.txt
[root@svr5 ~]# cat rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

1)输出所有行,相当于cat命令。

[root@svr5 ~]# sed -n 'p' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

2)输出第4行。

[root@svr5 ~]# sed -n '4p' rclocal.txt
     4  # You can put your own initialization stuff in here if you don't

3)输出第4~7行。

[root@svr5 ~]# sed -n '4,7p' rclocal.txt
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

4)输出第4行和第7行。

[root@svr5 ~]# sed -n '4p;7p' rclocal.txt
     4  # You can put your own initialization stuff in here if you don't
     7  touch /var/lock/subsys/local

5)输出第2行及之后的3行。

[root@svr5 ~]# sed -n '2,+3p' rclocal.txt
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.

6)输出以local结尾的行。

[root@svr5 ~]# sed -n '/local$/p' rclocal.txt
     7  touch /var/lock/subsys/local

7)输出奇数行。

[root@svr5 ~]# sed -n 'p;n' rclocal.txt
     1  #!/bin/sh
     3  # This script will be executed *after* all the other init scripts.
     5  # want to do the full Sys V style init stuff.
     7  touch /var/lock/subsys/local

8)输出偶数行。

[root@svr5 ~]# sed -n 'n;p' rclocal.txt
     2  #
     4  # You can put your own initialization stuff in here if you don't
     6

9)从第5行输出到最后一行。

[root@svr5 ~]# sed -n '5,$p' rclocal.txt
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

10)输出文本的行数。

[root@svr5 ~]# sed -n '$=' rclocal.txt
7

步骤三:认识sed工具的d输出操作
还以rclocal.txt文件为例,文件内容如下所示:

[root@svr5 ~]# cat rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

1)删除第3~5行文本

[root@svr5 ~]# sed '3,5d' rclocal.txt
     1  #!/bin/sh
     2  #
     6
     7  touch /var/lock/subsys/local

2)删除所有包含“init”的行。

[root@svr5 ~]# sed '/init/d' rclocal.txt
     1  #!/bin/sh
     2  #
     6
     7  touch /var/lock/subsys/local

3)删除所有包含“init”的行、所有包含“bin”的行。

[root@svr5 ~]# sed '/init/d;/bin/d' rclocal.txt
     2  #
     6
     7  touch /var/lock/subsys/local

4)删除不包括“init”的行。

[root@svr5 ~]# sed '/init/!d' rclocal.txt
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.

这个实际效果相当于只显示包含“init”的行:

[root@svr5 ~]# sed -n '/init/p' rclocal.txt
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.

5)删除文件的最后一行。

[root@svr5 ~]# sed '$d' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6

6)删除文件中的空行
手动新建一个测试文件:

[root@svr5 ~]# vim blankline.txt
abc

def
hijklmn



hello world
I am here

end

删除所有空行:

[root@svr5 ~]# sed '/^$/d' blankline.txt
abc
def
hijklmn
hello world
I am here
end

清理重复空行,若连续两个空行只保留一个:

[root@svr5 ~]# sed '/^$/{n;/^$/d}' blankline.txt
abc

def
hijklmn


hello world
I am here

end

步骤四:认识sed工具的s替换操作
还以rclocal.txt文件为例,文件内容如下所示:

[root@svr5 ~]# cat rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

1)将所有行中的第一个“ll”(如果有的话)替换为“TARENA”。

[root@svr5 ~]# sed 's/ll/TARENA/' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script wiTARENA be executed *after* all the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the fuTARENA Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

2)将所有的“ll”(如果有的话)替换为“TARENA”。

 [root@svr5 ~]# sed 's/ll/TARENA/g' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script wiTARENA be executed *after* aTARENA the other init scripts.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the fuTARENA Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

3)将第3行内的第2个“script”替换为“SCRIPT”。

[root@svr5 ~]# sed '3s/script/SCRIPT/2' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other init SCRIPTs.
     4  # You can put your own initialization stuff in here if you don't
     5  # want to do the full Sys V style init stuff.
     6
     7  touch /var/lock/subsys/local

4)删除文件内指定的字符串(替换为空)。
删除所有的“init”字符串:

[root@svr5 ~]# sed 's/init//g' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This script will be executed *after* all the other  scripts.
     4  # You can put your own ialization stuff in here if you don't
     5  # want to do the full Sys V style  stuff.
     6
     7  touch /var/lock/subsys/local

删除所有的“script”、所有的“stuff”、所有的字母e,或者的关系用转义方式 | 来表示:

[root@svr5 ~]# sed 's/script\|stuff\|e//g' rclocal.txt
     1  #!/bin/sh
     2  #
     3  # This  will b xcutd *aftr* all th othr init s.
     4  # You can put your own initialization  in hr if you don't
     5  # want to do th full Sys V styl init .
     6
     7  touch /var/lock/subsys/local

5)配置行的注释、解除注释。
以真实文件/etc/rc.local为例,文件内容如下:

[root@svr5 ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

解除/etc/rc.local文件第3~5行的注释(去掉开头的 # ):

[root@svr5 ~]# sed '3,5s/^#//' /etc/rc.local
#!/bin/sh
#
 This script will be executed *after* all the other init scripts.
 You can put your own initialization stuff in here if you don't
 want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

将/etc/rc.local文件的第6~7行注释掉(行首添加 # ):

[root@svr5 ~]# sed '6,7s/^/#/' /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
#
#touch /var/lock/subsys/local

步骤五:利用sed完成本例要求的任务
先建立一个包含英文段落的测试文件,比如可使用/etc/nsswitch.conf文件。为了方便查看效果,我们将从这个文件中取第4~10行,并去掉开头的“# ”。开头的10行内容如下所示:

[root@svr5 ~]# head -10 /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the

截取操作及结果如下所示:

[root@svr5 ~]# sed -n '4,10p' /etc/nsswitch.conf | sed 's/# //' > nssw.txt
[root@svr5 ~]# cat nssw.txt
An example Name Service Switch config file. This file should be
sorted with the most-used services at the beginning.
#
The entry '[NOTFOUND=return]' means that the search for an
entry should stop if the search in the previous entry turned
up nothing. Note that if the search failed due to some other reason
(like no NIS server responding) then the search continues with the

本小节的操作使用nssw.txt作为测试文件。
1)删除文件中每行的第二个、最后一个字符
分两次替换操作,第一次替换掉第2个字符,第二次替换掉最后一个字符:

[root@svr5 ~]# sed 's/.//2;s/.$//' nssw.txt 
A example Name Service Switch config file. This file should b
srted with the most-used services at the beginning
#
Te entry '[NOTFOUND=return]' means that the search for a
etry should stop if the search in the previous entry turne
u nothing. Note that if the search failed due to some other reaso
(ike no NIS server responding) then the search continues with th

2)删除文件中每行的第二个、最后一个单词
分两次替换操作,第一次替换掉第2个单词,第二次替换掉最后一个单词:

[root@svr5 ~]# sed -r 's/[a-Z]+//2;s/[a-Z]+([^a-Z]*)$/\1/' nssw.txt
An  Name Service Switch config file. This file should
sorted  the most-used services at the .
#
The  '[NOTFOUND=return]' means that the search for
entry  stop if the search in the previous entry
up . Note that if the search failed due to some other
(like  NIS server responding) then the search continues with

3)将文件中每行的第一个、第二个字符互换
每行文本拆分为“第1个字符”、“第2个字符”、“剩下的所有字符”三个部分,然后通过替换操作重排顺序为“2-1-3”:

[root@svr5 ~]# sed -r 's/^(.)(.)(.*)/\2\1\3/' nssw.txt
nA example Name Service Switch config file. This file should be
osrted with the most-used services at the beginning.
#
hTe entry '[NOTFOUND=return]' means that the search for an
netry should stop if the search in the previous entry turned
pu nothing. Note that if the search failed due to some other reason
l(ike n up . Note that if the search failed due to some other
(like  NIS server responding) then the search continues with

4)将文件中每行的第一个、第二个单词互换
每行文本拆分为“第1个单词”、“单词分隔”、“第2个单词”、“剩下的所有字符”四个部分,然后通过替换操作重排顺序为“3-2-1-4”:

[root@svr5 ~]# sed -r 's/([a-Z]+)([^a-Z]*)([a-z]+)(.*)/\3\2\1\4/' nssw.txt
example An Name Service Switch config file. This file should be
with sorted the most-used services at the beginning.
#
entry The '[NOTFOUND=return]' means that the search for an
should entry stop if the search in the previous entry turned
nothing up. Note that if the search failed due to some other reason
(no like NIS server responding) then the search continues with the

5)删除文件中所有的数字、行首的空格
因原文件内没有数字,行首也没有空格,这里稍作做一点处理,生成一个新测试文件:

[root@svr5 ~]# sed 's/o/o7/;s/l/l4/;3,5s/^/  /' nssw.txt > nssw2.txt
[root@svr5 ~]# cat nssw2.txt
An exampl4e Name Service Switch co7nfig file. This file should be
so7rted with the most-used services at the beginning.
  #
  The entry '[NOTFOUND=return]' means that the search fo7r an
  entry sho7ul4d stop if the search in the previous entry turned
up no7thing. Note that if the search fail4ed due to some other reason
(l4ike no7 NIS server responding) then the search continues with the

以nssw2.txt文件为例,删除所有数字、行首空格的操作如下:

[root@svr5 ~]# sed -r 's/[0-9]//g;s/^( )+//' nssw2.txt
An example Name Service Switch config file. This file should be
sorted with the most-used services at the beginning.
#
The entry '[NOTFOUND=return]' means that the search for an
entry should stop if the search in the previous entry turned
up nothing. Note that if the search failed due to some other reason
(like no NIS server responding) then the search continues with the

6)为文件中每个大写字母添加括号
使用“&”可调用s替换操作中的整个查找串,所以可参考下列操作解决:

[root@svr5 ~]# sed 's/[A-Z]/(&)/g' nssw.txt
(A)n example (N)ame (S)ervice (S)witch config file. (T)his file should be
sorted with the most-used services at the beginning.
#
(T)he entry '[(N)(O)(T)(F)(O)(U)(N)(D)=return]' means that the search for an
entry should stop if the search in the previous entry turned
up nothing. (N)ote that if the search failed due to some other reason
(like no (N)(I)(S) server responding) then the search continues with the

或者:

[root@svr5 ~]# sed -r 's/([A-Z])/(\1)/g' nssw.txt
(A)n example (N)ame (S)ervice (S)witch config file. (T)his file should be
sorted with the most-used services at the beginning.
#
(T)he entry '[(N)(O)(T)(F)(O)(U)(N)(D)=return]' means that the search for an
entry should stop if the search in the previous entry turned
up nothing. (N)ote that if the search failed due to some other reason
(like no (N)(I)(S) server responding) then the search continues with the
<think>嗯,用户想了解Linuxsed命令的详细用法和实例。首先,我需要回忆一下sed基本功能和常见用途。sed是流编辑器,主要用于文本处理,比如替换、删除、插入等操作。用户可能已经知道一些基础,但需要更深入的指导,包括语法和例子。 接下来,我得组织回答的结构。通常,用户喜欢分步骤或分部分的内容,这样容易理解。可能分为简介、语法、常用命令、实例、高级技巧和常见问题这几个部分。不过用户提供的示例里引用了替换、删除、插入、行寻址等,可能这些是重点。 要注意用户提到的系统级指令,比如行内数学公式用$...$,但这里可能用不上。不过要确保中文回答,正确使用LaTeX格式,如果有数学表达式的话。但sed命令主要涉及文本处理,可能不需要数学公式,但如果有例子中的正则表达式,可能需要用代码块来展示。 用户还要求生成相关问题,我需要考虑用户可能进一步想知道的内容,比如sed和awk的区别,正则表达式的高级用法,或者如何调试sed脚本。这些可以作为相关问题放在最后。 现在检查用户提供的引用内容。引用[1]提到sed是强大的文本处理工具,结合正则表达式和多个命令。引用[2]提到高级用法,如分支命令和流程控制。所以,在回答中需要包括基础命令和高级用法,比如分支、循环,以及如何组合多个命令。 用户可能的需求包括实际例子,比如替换文件中的文本、删除特定行、插入内容等。需要给出具体的命令示例,并解释每个参数的作用。例如,替换命令s的用法,如何指定行范围,使用不同的分隔符等。 另外,用户可能对sed的工作流程不太清楚,比如读取行到模式空间,处理后再输出。需要简要说明sed的处理过程,这样用户能更好地理解命令的效果,尤其是在处理多行或保持空间时。 还要注意常见问题,比如原地编辑文件需要-i选项,处理特殊字符时的转义,以及如何同时执行多个命令。这些是用户在实际使用中可能会遇到的坑,需要提前说明。 在高级技巧部分,可以介绍正则表达式的分组、反向引用,以及使用标签控制流程。例如,如何跳过某些处理步骤,或者根据条件执行不同的命令。这些内容在引用[2]中提到了分支命令b,所以需要详细解释。 最后,生成的相关问题需要围绕用户可能进一步探索的方向,比如sed与其他工具的比较、复杂文本处理案例、调试技巧等。确保问题能够引导用户深入学习。 总结一下,回答的结构应该是:简介、语法结构、常用命令、实例演示、高级技巧、常见问题、相关问题。每个部分用简洁的语言和示例说明,确保用户能一步步掌握sed用法。同时,注意引用中的内容,适当融入高级用法的讲解,比如分支命令和流程控制,以增强回答的深度。</think>### Linux sed命令详解及实例教程 --- #### 一、sed命令简介 sed(Stream Editor)是Linux中基于文本流的非交互式编辑器,通过逐行处理输入流实现文本替换、删除、插入等操作,支持正则表达式[^1]。 --- #### 二、基本语法 ```bash sed [选项] '命令' 输入文件 ``` **常用选项**: - `-i`:直接修改文件内容(慎用) - `-n`:仅显示处理后的行 - `-e`:执行多条命令(如 `sed -e 's/a/A/' -e 's/b/B/'`) - `-r`:启用扩展正则表达式 --- #### 三、核心操作命令 1. **替换命令 `s`** ```bash sed 's/原内容/新内容/[修饰符]' file.txt ``` - **修饰符**: - `g`:全局替换(默认仅替换每行首个匹配) - `p`:打印替换后的行 - `i`:忽略大小写 - **实例**: ```bash # 将文件中的"apple"替换为"orange"(仅首个匹配) sed 's/apple/orange/' file.txt # 全局替换并保存文件 sed -i 's/apple/orange/g' file.txt ``` 2. **删除命令 `d`** ```bash # 删除第3行 sed '3d' file.txt # 删除包含"error"的行 sed '/error/d' file.txt ``` 3. **插入/追加命令 `i` 和 `a`** ```bash # 在第2行前插入内容 sed '2i\Insert this line' file.txt # 在匹配行后追加内容 sed '/pattern/a\Append this line' file.txt ``` 4. **行寻址** - **范围操作**:`起始行,结束行` ```bash # 删除1到5行 sed '1,5d' file.txt # 对包含"start"到"end"的行执行替换 sed '/start/,/end/s/old/new/g' file.txt ``` --- #### 四、高级用法 1. **正则表达式分组** ```bash # 交换第1列和第2列(使用分组和反向引用) sed 's/\([^ ]*\) \([^ ]*\)/\2 \1/' file.txt ``` 2. **多命令组合** ```bash # 删除空行并替换内容 sed -e '/^$/d' -e 's/foo/bar/g' file.txt ``` 3. **分支命令 `b`(流程控制)** ```bash # 若行包含"skip",跳过后续处理 sed '/skip/{b end;}; s/old/new/; :end' file.txt ``` --- #### 五、经典实例 1. **提取日志中的时间戳** ```bash sed -n 's/.*\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\).*/\1/p' log.txt ``` 2. **批量重命名文件** ```bash ls *.txt | sed 's/\(.*\)\.txt/mv & \1.md/' | sh ``` 3. **处理多行文本** ```bash # 合并连续空行为单行 sed ':a; N; /\n$/ba; s/\n\+/\n/;' file.txt ``` --- #### 六、常见问题 1. **原地修改文件需谨慎**:使用 `-i` 前建议先备份或测试命令。 2. **特殊字符转义**:若替换内容含 `/`,可改用其他分隔符(如 `s#old#new#`)。 3. **性能优化**:处理大文件时避免频繁写操作,优先使用流式处理。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值