📌  相关文章
📜  bash 从每一行的末尾删除字符 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:33.151000             🧑  作者: Mango

代码示例1
# Basic syntax using sed:
sed 's/..$//' input_file
# Where:
#    - 's///' means 's/search_for/replace_with/'
#    - '.' means any character
#    - $ means end of the line
# Putting it together, this sed statement means: replace any two 
#    characters at the end of every line with nothing. 

# Note, adapt this for your needs by changing the search pattern. 
#    E.g., by adding more '.'s, changing the search pattern, etc