This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prompts the user for a URL if not provided as a command-line argument. | |
# Extracts the ID from the given URL to use in API requests. | |
function promptForURL() { | |
local url="$1" | |
until [ -n "$url" ]; do | |
read -p "URL: " url | |
done | |
id=$(sed 's|.*gofile.io/d/||g' <<< "$url") |