
Dieser Code scheint einen HTTP-Status von 000 auszugeben – was darauf hindeutet, dass die Verbindung nicht richtig zustande gekommen ist. Wenn ich diesen Curl jedoch außerhalb des Bash-Skripts ausführe, funktioniert er einwandfrei und gibt 200 aus. Mit diesem Code stimmt also etwas nicht. Irgendwelche Tipps?
#!/bin/bash
URLs=$(cat test.txt | grep Url | awk -F\ ' { print $2 } ')
# printf "Preparing to check $URLs \n"
for line in $URLs
do curl -L -s -w "%{http_code} %{url_effective}\\n" $line
done