好东西取代它,所以我想通过YAML文件搜索找到的代码如何找到在一个文本文件中的特定行,并与其他
YAML的文件通常会看起来像一个特定的行这一点,但它可能有正负其他一些线路:
timestamps:
login: 1397256621980
logout: 1397267743528
lastteleport: 1397265370690
ipAddress: 127.0.0.1
lastlocation:
world: world
x: -208.52097206207856
y: 64.0
z: -367.26689797238714
yaw: 199.81995
pitch: 11.099998
logoutlocation:
world: world
x: -160.36469909073216
y: 64.0
z: -422.31472024960175
yaw: 235.05505
pitch: 30.90003
money: '1.0'
socialspy: true
afk: false
uuid: b735fgb3-9830-3556-bdf3-5abdd9206368
powertools: {}
我试图取代线
socialspy: true
与
socialspy: false
但约30分钟后,我没有运气。我了解扫描仪的基本知识,但对文件编写者等没有任何了解。
好了,这听起来像你应该做的文件作家和这样的一些研究。 –
不要编辑文件。将结果写入另一个文件,然后重命名为原始文件 – fge
编辑文件是否是一件坏事? – user3461895