原语句:
#!/bin/bash
for test in I don't know if this'll work
do
echo "work:$test"
done
结果:
work:I
work:dont know if thisll
work:work
改成后语句:
#!/bin/bash
for test in I don\'t know if "this'll" work
do
echo "work:$test"
done
结果:
work:I
work:don't
work:know
work:if
work:this'll
work:work