Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash swap two columns in a file

# Example usage:
awk '{t=$1; $1=$2; $2=t; print;}' input_file # Swap column 1 and column 2
# Where:
#	- this assigns column 1 to a dummy variable t, makes column 1 equal
# 		to column 2, and then assigns the contents of t to column 2
Comment

PREVIOUS NEXT
Code Example
Shell :: how to find where a program is on windows 
Shell :: Criar um dispositivo gerido por cores 
Shell :: zsh profile 
Shell :: show wifi password linux 
Shell :: openssl generate certificate 
Shell :: ubuntu baixar node com nvm 
Shell :: set hostname on command line ec2 
Shell :: do a chechsum verification from command prompt 
Shell :: How to Block apache Ports 
Shell :: linux set multiline variable 
Shell :: bash find only first answer 
Shell :: Install Specific Version of chrome on ubuntu 
Shell :: show rights inside folder debian 
Shell :: how do i install tkinter on windows 7 
Shell :: ffmpeg take screenshot 
Shell :: add github to windows credentials 
Shell :: dpkg: error processing package gitweb (--configure): installed gitweb package post-instal 
Shell :: bash view system log info 
Shell :: ArgumentError: Malformed version number string 0.32+git 
Shell :: ubuntu set sudoers to use vim 
Shell :: How to create folder and cd into it with one command 
Shell :: list installed dotnet versions 
Shell :: change hstr editor 
Shell :: bash iterate over list of files 
Shell :: git shortcut 
Shell :: increase upload size apache 
Shell :: set sublime text as git editor 
Shell :: windows cmd schedule shutdown 
Shell :: pocketsphinx 
Shell :: git remove all tags 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =