Created
June 6, 2022 07:17
-
-
Save usagimaru/37c084676f9287410ffbddd6cc91d4ab to your computer and use it in GitHub Desktop.
Simplify Amazon.co.jp URL
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/sh | |
echo "$1" | \ | |
sed -E 's/(https:\/\/www\.amazon\.co\.jp)\/.*\/([0-9A-Z]{10})[\/\?]?.*/\1\/dp\/\2/' | |
# % amazonurl.sh "https://www.amazon.co.jp/構造化ユーザインタフェースの設計と評価/dp/4320029968" | |
# % https://www.amazon.co.jp/dp/4320029968 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
「Amazon.co.jpのURLを最適化」Shortcuts、iOS / macOS両対応。(Amazon.co.jp 専用)
https://www.icloud.com/shortcuts/17189aaae1ba4ee1ac7b7a1796997d69