Im trying to use ex file <<EOF vi commands to go to end of a file, then go up 100 lines, then delete from that position to end of file.
How can I use the G command to go to end of file within a shell script
#!/bin/bash
ex data1 <<EOF
G
100G
dG
w
q
EOF