The little things give you away... A collection of various small helper stuff
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

22 行
561 B

  1. #!/bin/bash
  2. # Usage: wpull2-extract-remaining [FILENAME]
  3. # FILENAME points to a wpull 2.x SQLite DB; if not specified, defaults to wpull.db
  4. # Prints all remaining URLs from the DB on stdout
  5. if [[ $# -eq 1 ]]
  6. then
  7. filename="$1"
  8. else
  9. filename=wpull.db
  10. fi
  11. if [[ ! -f "${filename}" ]]
  12. then
  13. echo "Error: ${filename} does not exist or is not a regular file" >&2
  14. exit 1
  15. fi
  16. for status in in_progress todo error
  17. do
  18. sqlite3 "${filename}" 'SELECT url_strings.url FROM queued_urls JOIN url_strings ON url_string_id = url_strings.id WHERE status = "'$status'"'
  19. done