I am trying to get the column name of a file and am printing it again. I think the problem is with B12FUT818 desired output: but I found Output is empty screen. You just would better and then In addition, it uses only, and does not contain any unnecessary edges. Edit. To reply to your comment, you can enable the loop through the header field: Edit 2. There were many mistakes in its original method, here its the correct version (though I have written a better way to solve your problem before I wrote it): Hope it helps! print $ i , but I do not know how to correct it, I'm trying to code:
#! / Bin / bash for me {2..5} Set snp = head -n 1 small.txt | | Example input file:
ID name age gender state extension 1a 12 mt 811 2 esc '{print $ i}' echo $ snp done
name age gender state extension
read the first line of your file and result one Archive as an array:
Read-A Header & lt;
printf "% s \ n" "$ {header
printf related fields: @]: 1 } "
read -a header & lt; Small for SNP in "$ {header [@]: 1}" What is "$ snp"
i in {2 .5}; "Snp = $ (head -n 1 small.txt | awk" {print \ $$ i} ")" $ snp "echo
awk '{print $ i}' ,
$ i >
head and
awk 4 times, while you do not need it to be a single external process.
No comments:
Post a Comment