Skip to content

"List Index out of range" error when using xargs? #118

Description

@IngwiePhoenix

I put together a list of links in Notepad and wanted to use anime-dl from WSL2 running Debian to run through the links I picked.

$ xargs -a links.txt -d "\n" -L 1 anime dl
anime: anime-downloader 4.5.0
anime: Extracting episode info from page
ERROR: list index out of range

If I copy/paste the link and write the command in myself ($ anime dl "...") it works. But weirdly, not here.

I had tried to use a script previously but, same result:

#!/bin/bash
if [ "x$1" = "x" ]; then
  echo "$0 <link list>";
  exit 1;
fi

if [ ! -f "$1" ]; then
  echo "$1: File not found.";
  exit 1;
fi

for i in $(cat $1); do
  echo "URL: $i"
  anime dl "$i"
done

I am a bit confused... Ideas? o.o

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions