我有很多看起来像这样的文本文件:
@H_404_13@>ALGKAHOLAGGATACCATAGATGGCACGCCCT >BLGKAHOLAGGATACCATAGATGGCACGCCCT >HLGKAHOLAGGATACCATAGATGGCACGCCCT >DLGKAHOLAGGATACCATAGATGGCACGCCCT >ELGKAHOLAGGATACCATAGATGGCACGCCCT >FLGKAHOLAGGATACCATAGATGGCACGCCCT >JGGKAHOLAGGATACCATAGATGGCACGCCCT >POGKAHOLAGGATACCATAGATGGCACGCCCT
有没有办法在不使用awk替换的情况下进行采样?
例如,我有这8行,我只想在一个新文件中随机抽样4个,而无需替换.
输出应该如下所示:
>FLGKAHOLAGGATACCATAGATGGCACGCCCT >POGKAHOLAGGATACCATAGATGGCACGCCCT >ALGKAHOLAGGATACCATAGATGGCACGCCCT >BLGKAHOLAGGATACCATAGATGGCACGCCCT
提前致谢