sleep 1
select 0
hardcopy -h '/path-to-session/SESSION_demo/main/scrollback'
stuff 'history -w /path-to-session/SESSION_demo/main/history'"^M"
stuff 'pwd > /path-to-session/SESSION_demo/main/pwd'"^M"

sleep 1
select 1
register a "^A"':source '"'"'/path-to-session/SESSION_demo/bash - \var\log\/save_screenrc'"'"
process a

sleep 1
select 2
register a "^A"':source '"'"'/path-to-session/SESSION_demo/bash - \usr\local\/save_screenrc'"'"
process a
