diff --git a/assets/pdfs/a1.sh b/assets/pdfs/a1.sh new file mode 100755 index 0000000..26fc5d1 --- /dev/null +++ b/assets/pdfs/a1.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Get a list of all PDF files in the current directory +files=(*.pdf) + +# Remove the first character and store the results in a new array +new_files=() +for file in "${files[@]}"; do + new_files+=("${file:1}") +done + +# Remove the ".pdf" extension and store the results in another array +final_files=() +for file in "${new_files[@]}"; do + final_files+=("${file%.pdf}") +done + +# Sort the final list in ascending order +final_files=($(printf "%s\n" "${final_files[@]}" | sort -n)) + +# Print the sorted list to a new text file +printf "%s\n" "${final_files[@]}" > a1_names.txt diff --git a/assets/pdfs/a1_names.txt b/assets/pdfs/a1_names.txt new file mode 100644 index 0000000..f6f097d --- /dev/null +++ b/assets/pdfs/a1_names.txt @@ -0,0 +1,86 @@ +ss4 +ss4 +w2 +w2w3 +w4 +w7 +w7 +w7sp +w7sp +w9 +w9 +17 +54 +216 +334 +463 +505 +519 +525 +555 +556 +559 +590b +594 +706 +706 +709 +843 +843 +926 +941 +941 +970 +1040es +1040gi +1040s +1040s1 +1040s2 +1040s3 +1040tt +1040x +1040x +1041 +1041 +1065 +1065 +1099ac +1099c +1099r +1116 +1116 +1120 +1120 +1127 +1660 +2555 +2555 +2587 +2848 +2848 +3520 +3520 +4245 +4491 +4491x +4506 +4506t +4868-auto-extension +5471 +5471 +8453 +8606 +8606 +8814 +8814 +8821 +8821 +8865 +8879 +8936 +8938 +8938 +8958 +9465 +9465 +12153 diff --git a/assets/pdfs/1.extract.subject.sh b/assets/z-bash-stuff-4-pdfs/1.extract.subject.sh similarity index 100% rename from assets/pdfs/1.extract.subject.sh rename to assets/z-bash-stuff-4-pdfs/1.extract.subject.sh diff --git a/assets/pdfs/1.extract.titles.sh b/assets/z-bash-stuff-4-pdfs/1.extract.titles.sh similarity index 100% rename from assets/pdfs/1.extract.titles.sh rename to assets/z-bash-stuff-4-pdfs/1.extract.titles.sh diff --git a/assets/pdfs/1.pdf.title.txt b/assets/z-bash-stuff-4-pdfs/1.pdf.title.txt similarity index 100% rename from assets/pdfs/1.pdf.title.txt rename to assets/z-bash-stuff-4-pdfs/1.pdf.title.txt diff --git a/assets/pdfs/1.title.sh b/assets/z-bash-stuff-4-pdfs/1.title.sh similarity index 100% rename from assets/pdfs/1.title.sh rename to assets/z-bash-stuff-4-pdfs/1.title.sh diff --git a/assets/pdfs/PTIN.Application.Checklist_Internal.Revenue.Service.pdf b/assets/z-bash-stuff-4-pdfs/PTIN.Application.Checklist_Internal.Revenue.Service.pdf similarity index 100% rename from assets/pdfs/PTIN.Application.Checklist_Internal.Revenue.Service.pdf rename to assets/z-bash-stuff-4-pdfs/PTIN.Application.Checklist_Internal.Revenue.Service.pdf diff --git a/assets/z-bash-stuff-4-pdfs/a1_prompt.txt b/assets/z-bash-stuff-4-pdfs/a1_prompt.txt new file mode 100644 index 0000000..33dcd59 --- /dev/null +++ b/assets/z-bash-stuff-4-pdfs/a1_prompt.txt @@ -0,0 +1,17 @@ +Generally: +I want a bash script that will organize the files in one directory. + +I have a list of PDF files in one directory. +All files start with "i", "p" or "f". +All files have the extension, ".pdf". + +I would like to use a multi-step approach. + +1. Remove the first character of the filename and save the name to a list. +All the files have the extension ".pdf". +2. Using the list, remove the file extensions, ".pdf" from all the files names, saving the resultant. +3. Next I want the list of abbrevaited-filenames sorted in ascending order. + +For example: (p555.pdf, i456.pdf, f1010-sr.pdf) would become (1010, 456, 555) + +4. Print the list of filenames to a new text document, called a1_names.txt. diff --git a/assets/pdfs/aaa.txt b/assets/z-bash-stuff-4-pdfs/aaa.txt similarity index 100% rename from assets/pdfs/aaa.txt rename to assets/z-bash-stuff-4-pdfs/aaa.txt diff --git a/assets/pdfs/bold_words.md b/assets/z-bash-stuff-4-pdfs/bold_words.md similarity index 100% rename from assets/pdfs/bold_words.md rename to assets/z-bash-stuff-4-pdfs/bold_words.md diff --git a/assets/pdfs/code.to.md.sh b/assets/z-bash-stuff-4-pdfs/code.to.md.sh similarity index 100% rename from assets/pdfs/code.to.md.sh rename to assets/z-bash-stuff-4-pdfs/code.to.md.sh diff --git a/assets/pdfs/file_list.txt b/assets/z-bash-stuff-4-pdfs/file_list.txt similarity index 100% rename from assets/pdfs/file_list.txt rename to assets/z-bash-stuff-4-pdfs/file_list.txt diff --git a/assets/pdfs/minor-p4693a.pdf b/assets/z-bash-stuff-4-pdfs/minor-p4693a.pdf similarity index 100% rename from assets/pdfs/minor-p4693a.pdf rename to assets/z-bash-stuff-4-pdfs/minor-p4693a.pdf diff --git a/assets/pdfs/minor-p5279.pdf b/assets/z-bash-stuff-4-pdfs/minor-p5279.pdf similarity index 100% rename from assets/pdfs/minor-p5279.pdf rename to assets/z-bash-stuff-4-pdfs/minor-p5279.pdf diff --git a/assets/pdfs/p17.2023.pdf b/assets/z-bash-stuff-4-pdfs/p17.2023.pdf similarity index 100% rename from assets/pdfs/p17.2023.pdf rename to assets/z-bash-stuff-4-pdfs/p17.2023.pdf diff --git a/assets/pdfs/p17.part.2.5.pdf b/assets/z-bash-stuff-4-pdfs/p17.part.2.5.pdf similarity index 100% rename from assets/pdfs/p17.part.2.5.pdf rename to assets/z-bash-stuff-4-pdfs/p17.part.2.5.pdf diff --git a/assets/pdfs/p17.part1.4.tax.withholding.est.tax.pdf b/assets/z-bash-stuff-4-pdfs/p17.part1.4.tax.withholding.est.tax.pdf similarity index 100% rename from assets/pdfs/p17.part1.4.tax.withholding.est.tax.pdf rename to assets/z-bash-stuff-4-pdfs/p17.part1.4.tax.withholding.est.tax.pdf diff --git a/assets/pdfs/p17.part2.pdf b/assets/z-bash-stuff-4-pdfs/p17.part2.pdf similarity index 100% rename from assets/pdfs/p17.part2.pdf rename to assets/z-bash-stuff-4-pdfs/p17.part2.pdf diff --git a/assets/pdfs/pcir230.pdf b/assets/z-bash-stuff-4-pdfs/pcir230.pdf similarity index 100% rename from assets/pdfs/pcir230.pdf rename to assets/z-bash-stuff-4-pdfs/pcir230.pdf diff --git a/assets/pdfs/pdf.2.table.ordered.sh b/assets/z-bash-stuff-4-pdfs/pdf.2.table.ordered.sh similarity index 100% rename from assets/pdfs/pdf.2.table.ordered.sh rename to assets/z-bash-stuff-4-pdfs/pdf.2.table.ordered.sh diff --git a/assets/pdfs/pdf.2.table.sh b/assets/z-bash-stuff-4-pdfs/pdf.2.table.sh similarity index 100% rename from assets/pdfs/pdf.2.table.sh rename to assets/z-bash-stuff-4-pdfs/pdf.2.table.sh diff --git a/assets/pdfs/pdf2.txt b/assets/z-bash-stuff-4-pdfs/pdf2.txt similarity index 100% rename from assets/pdfs/pdf2.txt rename to assets/z-bash-stuff-4-pdfs/pdf2.txt diff --git a/assets/pdfs/regulation_1_6011_4.pdf b/assets/z-bash-stuff-4-pdfs/regulation_1_6011_4.pdf similarity index 100% rename from assets/pdfs/regulation_1_6011_4.pdf rename to assets/z-bash-stuff-4-pdfs/regulation_1_6011_4.pdf diff --git a/assets/pdfs/subject.2.filename.sh b/assets/z-bash-stuff-4-pdfs/subject.2.filename.sh similarity index 100% rename from assets/pdfs/subject.2.filename.sh rename to assets/z-bash-stuff-4-pdfs/subject.2.filename.sh