URLのパラメータを削る

cut -f1 -d?

echo https://test.com?val=1 | cut -f1 -d?
https://test.com