cat input_file.fq | \ perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt