Code review comment for ~raharper/curtin:fix/udevadm-info-shlex-quote

Revision history for this message
Shawn Weeks (absolutesantaja) wrote :

Thanks for the better test. I didn't fully understand what shlex was aiming for. I see the correct output now.

#!/bin/bash

outputVar=$(
cat << EOF | python
fileString = "'SanDisk''"
output = "'" + fileString.replace("'", "\'\"\'\"\'") + "'"
print output
quit()
EOF
)

sh -c "echo $outputVar"

'SanDisk''

« Back to merge proposal