Just place the following three lines at the top of the script (without any blank lines):
Code: Select all
#!/bin/sh
tail -n +4 $0 > /tmp/script.txt
exec rxvt -e sh /tmp/script.txt
Code: Select all
read
Code: Select all
#!/bin/sh
tail -n +4 $0 > /tmp/script.txt
exec rxvt -e sh /tmp/script.txt
echo Syncing...
sync