for year in 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 # 2004 do mkdir years/${year} cat hupd-subset/lists/$year.txt | xargs -i mv distilled/{}.json years/${year} done