Is there a way to make pasting into Terminal safe? - Ask Different - apple.stackexchange.com

PHOTO EMBED

Fri Dec 04 2020 04:55:33 GMT+0000 (UTC)

Saved by @canering #sh

#!/bin/bash

read -p "Are you sure you wish to execute \`$(pbpaste)\`? (Y/n) "    
[[ $REPLY =~ ^[Yy]?$  ]] && pbpaste | bash
content_copyCOPY

https://apple.stackexchange.com/questions/72182/is-there-a-way-to-make-pasting-into-terminal-safe?rq