is there a way to open or cat a file that's been newly created e.g.
cat $(cat 1210.hc.vcf | head -n1 > ok.txt )
open $(cat 1210.hc.vcf | head -n1 > ok.txt )
Open a file after writing to it using Bash (in one line)
CodePudding user response:
You can use tee
to write to stdout and the file.
head -n 1 1210.hc.vcf | tee ok.txt
CodePudding user response:
What comes in my mind:
cat 1210.hc.vcf | head -n1 > ok.txt; cat !$