readded udpated scripts directory

This commit is contained in:
tomit4 2022-06-09 12:59:03 -07:00
parent cd053a412a
commit f3117c81d9
84 changed files with 3210 additions and 0 deletions

BIN
scripts/parallel/0.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/1.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/10.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/2.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/3.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/4.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/5.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/6.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/7.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/8.html.gz Normal file

Binary file not shown.

BIN
scripts/parallel/9.html.gz Normal file

Binary file not shown.

View file

@ -0,0 +1,18 @@
NOTE: You will need to download GNU parallel for this (doas pacman -S parallel)
This is just some notes regarding what's in here. The html files were created using a simple for loop:
for (( i=0; i<=10; i++ )); do
touch $i.html
done
Then in the command line, I copied a command from the bash.pdf book I'm reading in order to better understand GNU parallel, a command line program that allows for parallel processes to be executed (similar to xargs):
find . -type f -name '*.html' -print | parallel gzip
This will use the find command within the current directory, of a the type file, with the name all files that end in .html, and then send to standard output the results via the -print flag, afterwards which those
results are piped to GNU parallel which then asynchronously processes them through gzip (and thusly, compresses all .html files).
Note that GNU parallel is a powerful command line tool, you can execute a series of commands in sequence by reading them from a file and then passing them through parallel using the -j flag:
parallel -j 10 < file

View file

@ -0,0 +1,8 @@
#!/bin/bash
# Note you will need to install both parallel and traceroute to use this (doas pacman -S parallel traceroute)
{
echo foss.org.my ;
echo debian.org ;
echo freenetproject.org ;
#} | parallel traceroute
} | parallel -k traceroute # makes sure that the output of parallel is displayed in the order that the arguments passed were given (i.e. foss.org.my results are displayed first)