Search code examples
bashshellterminalrtmp

Ambiguous redirect error while using rtmpdump


So I was trying to download somevideos using rtmpdump, and I used this shell script which is supposed to download the some videos but it gave me and error message saying

./script: line 9: $1: ambiguous redirect

Now I am pretty sure that I am doing something silly so I will tell you exactly what I did. I first downloaded that above file into my system saved it as "script". And opened terminal and typed:

./script

and it gave me the above error.

Now I have also gone through this thread, and also some other threads but they don't seem help me at all and now I have nowhere to go. please save me.


Solution

  • script tries to use $1 as the name of a file for redirection (e.g., someCommand > "$1"), but you didn't supply a an argument when you called script.