Skip to content
  • View menu
  • View sidebar

bioinfo core

Index & solution of bioInfo utilities

  • Home
  • All entries
  • Blogs
  • Contact
  • About

Categories

  • Between languages (7)
  • Blogs (8)
  • Python (35)
  • R (1)
  • Unix (37)

Tags

bedfile Blogs conda Excel html numpy Pandas Python R slurm Unix
04/26/202110/21/2021 by bioinfocore

Unix rearrange columns

  • Unix
  • Unix
awk 'BEGIN {FS="\t"; OFS="\t"} {print $2, $3, $4, $1}' input.txt > output.txt

FS and OFS specify the input/output separator

Source:
https://unix.stackexchange.com/questions/344541/easiest-way-to-rearrange-columns-and-manipulate-text-file

Post navigation

← Previous Post Liftover bam files
Next Post → Unix generate a random string
Copyright 2022 | by bioinfocore