Skip to content

Instantly share code, notes, and snippets.

@dvu4
Created September 16, 2025 17:47
Show Gist options
  • Save dvu4/b98db77d72ea1c1ede4342011adbba24 to your computer and use it in GitHub Desktop.
Save dvu4/b98db77d72ea1c1ede4342011adbba24 to your computer and use it in GitHub Desktop.

This script looks for all files starting with protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages and print row counts in each file

for f in $(ls -1 | grep 'protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages');do
count=$(wc -l < "$f")
echo "$f : $count"
done

The output :

protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages24-49_USH.dat :    32668
protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages24-49.dat :  1966142
protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages50-64_USH.dat :    43920
protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages50-64.dat :  2393405
protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages65+_USH.dat :    78427
protected_WAG_CNVR_FY26_Immz_2yr_1Vax_Ages65+.dat :  5836725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment