Re:“This project will only take 2 hours”
by ktpsns on Wednesday November 10, 2021 @10:07AM
(#29175362)
No, >> is just doing appending, cf. https://wiki.bash-hackers.org/syntax/redirection#appending_r...
Re:“This project will only take 2 hours”
by BenjiWiebe on Wednesday November 10, 2021 @10:04AM
(#29175330)
Doesn't look like it. The URLS variable could more appropriately be named CURRENT_URL. Singular, not plural.
eg, copying http://example.com/foo and then http://example.com/bar and then http://example.com/baz I think urls.txt would look like:
EDIT: I stand corrected. I should have run the code instead of mentally executing it.One issue I did find when I ran it. The shebang should be:
as [[ is a bash built-in. I'm on Ubuntu - maybe this works on Mac as /bin/sh is an alias to /bin/bash?