Grepping PowerPoint files

Last updated: 2023/03/07 I’m not really a fan of PowerPoint but it’s ubiquitous in research, so I have to work with them. Sometimes I need to find a slide amongst a pile of PowerPoint files and waste a lot of time opening and closing files. I wondered whether I could grep PowerPoint files and sure…

Continue Reading

Bash script that accepts short, long, and positional arguments

I asked ChatGPT to "Write me a Bash script that accepts short, long, and positional arguments" and it came up with the following: #!/bin/bash # Define short options options=":s:l:" # Define long options long_options=("short-option:" "long-option:") # Parse options and arguments while getopts "$options" opt; do case $opt in s) short_opt_arg="$OPTARG" ;; l) long_opt_arg="$OPTARG" ;; \?)…

Continue Reading