Question: Get the acmart.html from Canvas. This file is downloaded from the following link: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/acmart/ Extract all web links from this file, convert them to absolute
Get the acmart.html from Canvas. This file is downloaded from the following link:
http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/acmart/
Extract all web links from this file, convert them to absolute paths (instead of relative), and store them in a file named links.
The links in this file are like the following:
ACM-Reference-Format.dbx">ACM-Reference-Format.dbx
These paths are relative to the current directory on the server. However, for our case, you need to convert the links to absolute paths, preceding with the link of the webpage where the file was downloaded from. The above html link must be converted to the following.
http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/acmart/ACM- Reference-Format.dbx
For this, you need to first filter all the line that include the string href=. Use grep for this.
Then use sed and proper string substitution multiple times to rip away any string before href=" and after .
Finally redirect the generated lines to the file links. The generated output is already on Canvas, named links-lab05. You could compare you output against contents of this file.
Include the script(s) in a bash file, so that after running the bash file, the input file will be processed and the corresponding output be generated.
To make a bash script file:
1) Make a text file (ex. lab5.sh)
2) First line must be #!
Usually bash is located at /bin/bash, so the first line of this line will be #!/bin/bash
3) Set the executable permission of the bash file
chmod +x lab5.sh (this command will set x permission of the file for all fields)
4) Include the Linux commands in the bash script file
5) Run the file
./lab5.sh
You could just see the sample-script.sh bash script on canvas and modify it. Just remove the Unix commands and insert you own command instead. Or you could do every other thing that you want. Explore and be creative.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
