Why awk script does not work on Mac OS but works on Linux?

后端 未结 2 670
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 14:20

I have this awk script that I use to filter genes that are differentially expressed. I have a csv file that was created in R.

 #Command to get DE genes
awk -         


        
2条回答
  •  -上瘾入骨i
    2020-12-05 14:56

    A same command name doesn't mean it is the same command. Most basic commands have a different implementation, AWK is an example, but almost all the GNU core utils has their equivalent in BSD license. You should be careful with GNU sed and BSD sed, it's a pitfall too.

    In reality Linux generally uses gawk or mawk:

    $ man awk
    mawk - pattern scanning and text processing language
    

    Mac OS uses generally nawk:

    $ man awk
    awk - pattern-directed scanning and processing language
    

    See this page for more informations about AWK implementations.

提交回复
热议问题