3 ms·
Use the command line to get the URLs for each chapter? Go to conqueringthecommandline.com/book Save the page source Insert the filename into the script b
by 101914 11y ago
Use the command line to get the URLs for each chapter?
Go to conqueringthecommandline.com/book
Save the page source
Insert the filename into the script below
Alternatively, omit filename and pipe the source of the page to the script
Works with BSD sed as well as GNU sed; first lesson: portability
a=$(printf '\004')
sed 's/s3_url/'"$a"'&/' \
|tr '\004' '\012' \
|exec sed '
s/\\u0026/\&/g;
s/.*s3_url.:.//g;
s/\".*//g;
/https:.*Amz/!d;
' filename
I do not recommend this "book". Look at the hoops they make readers jump through. Try grymoire.com; much better and no Javascript required
- mhartl 11y agoYou appear to be confusing two different documents. The OP refers to http://learnenough.com/command-line http://learnenough.com/command-line, not http://conqueringthecommandline.com/book http://conqueringthecommandline.com/book.
- deleted 11y ago[deleted]
- 101914 11y agoIndeed. My apologies. Instructions to get the URL to the Hartl draft are the same, except: Substitute "learnenough.com/command-line" for "conqueringthecommandline.com/book" Script will work just the same.