#! /bin/sh # $NetBSD: shquote.sh,v 1.2 2019/05/22 20:47:05 rillig Exp $ # Quotes all shell meta characters from $1 and writes the result to $shquoted. shquote() { shquoted=$1 case $shquoted in *\'*) # replace each ' with '\'' shquoted=`$tools_wrapper_sed -e "s,','\\\\\\\\'',g" <