cli stuff I use with nget

tuppe666
2004-09-23
2013-03-21
  • tuppe666
    tuppe666
    2004-09-23

    I use this to get rid of corrupted zip files(of which there does seem an awful lot)

    for i in *.zip; do advzip -t -4 "$i" || rm "$i"; done

    I use this to change the naming mechanism (which I do think is sensible

    ls | awk -F'.' '/.zip./ {printf"mv %s.%s.%s.%s %s.%s.%s.%s\n", $1,$2,$3,$4,$3,$4,$1,$2}' | sh

    or

    ls *.zip.* | while IFS=. read v1 v2 v3 v4; do mv "$v1.$v2.$v3.$v4" "$v3.$v4.$v1.$v2"; done

    The only thing I can't seem to do is limit downloads to the first file that fits my regex and stop

     
    • TH
      TH
      2004-10-08

      Try doing a nget -G group -r regex -T | head -1, pipe that line to something which picks out the messageid, and use nget -G group -R "mid messageid ==" where messageid is the id you found.