How to change column names in shell/bash? -
This question can be very easy for most of you, but I really do not want to do it manually. Assume that I have a file in the terminal such as:
[dz2t @ edison-s GWAS] $ head $ PHENO GWASID CHILDID VSTNUM GENDER GA 1001 1001 11 Woman -9 1002 1002 11 Male-9 1003 1003 11 Male-9 1004 1004 11 Male-9 1005 1005 11 Female -9 1006 1006 11-9 How will the names of two columns change before "GWASID" and " Children "to" FID "and" IID "
You can: < Pre> SD-A '1S / GWAISID / FID / A-A' 1S / ChildID / IID / 'Your file' It says that L'1 line, alternative Jeedblyuesaidi with FID and Chaildaid with IID. If you want to overwrite this file, you will need to add the -i flag after the sed word to edit the encode.
Comments
Post a Comment