📌  相关文章
📜  bash 从另一列中添加或减去一列 - Shell-Bash 代码示例

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

代码示例1
# Basic syntax:
awk 'BEGIN {set_delimiter}; {print $column# +_or_- $column#}' input_file

# Example usage:
awk 'BEGIN {OFS="\t"}; {print $1 - $2}' input_file
# Set the delimiter to tab-delimited, print column 1 minus column 2

awk 'BEGIN {OFS="\t"}; {print $0, $1 + $2}' input_file
# Set the delimiter to tab-delimited, print all columns followed by
# column 1 plus column 2