Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Replacement of the contents of the file

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1. If it's just a string in a file, you can use g/192.168.254.2/s/192.168.254.2/10.2.2.3/g

The explanation is as follows: Gram 192.168.254.2 indicates that the string 192.168.254.2 is searched in full text, and the string found is followed by

Operation. The string will be replaced by the string substitution in 192.168.254.2 and 10.2.2.3, and the last g indicates the whole substitution.

2. Another method is more worth learning. Sed's myfile 192.168.254.2 Citrus 10.2.2.3 Universe GI. Note two points: first, 10.2.2.3 is followed by a slash, and then-I writes the result directly back to myfile.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report