Extract a GFS variable
Just to expand upon my comments:

This page from CPC suggests that the error message is likely due to wgrib2 thinking subsequent arguments are actually additional grib files because they aren't properly given the - prefix.  That lead me to realize that you have a space between your last dash and grib which appears to cause the error:


  wgrib2 gfst.grb2 -match ":(APCP):" - grib gfst.grb2.small


should be


  wgrib2 gfst.grb2 -match ":(APCP):" -grib gfst.grb2.small


Hopefully that helps if anyone else comes across the issue at a later date!  You might also have forgotten a dash somewhere... or tried using too many arguments in an option?