Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash add or subtract one column from another

# Basic syntax:
awk 'BEGIN {set_delimiter}; {print $column# +_or_- $column#}' input_file

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

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

PREVIOUS NEXT
Code Example
Shell :: rostopic echo filter 
Shell :: add webhook to all github repos 
Shell :: remove docker image 
Shell :: commit convention 
Shell :: install node mac 
Shell :: linux extract zip with password 
Shell :: linux zip a folder without compression 
Shell :: batch delete folder 
Shell :: systemcd service user 
Shell :: hdfs dfs add file 
Shell :: nvm newest version 
Shell :: laravel 8 composer install 
Shell :: bash script how to show a file by using less 
Shell :: All matches were filtered out by modular filtering for argument 
Shell :: stop docker container 
Shell :: redis start stop commands 
Shell :: ubuntu touchpad not working 
Shell :: kill all processes holding a port 
Shell :: error Failed to install the app. Make sure you have the Android development environment set up 
Shell :: delete node_modules 
Shell :: pyqt5 designer download 
Shell :: git cherry pick range 
Shell :: remove or undo last merge git 
Shell :: pip force reinstall 
Shell :: change history editor 
Shell :: nuget clear cache cli 
Shell :: oevrride localwith remote branch 
Shell :: install zotero linux 
Shell :: does jupyter notebook come with anaconda in ubuntu 
Shell :: bash vlookup function 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =