ken@titan ~/tmp $ cat > pm_11133222_rcfile . ~/.bashrc cd ~/tmp/pm_11133222_test_dir #### #!/usr/bin/env perl use strict; use warnings; use autodie ':all'; my @commands = ( 'set -vx', 'pwd', "cd $ENV{HOME}", 'pwd', 'date', "/usr/bin/bash --rcfile $ENV{HOME}/tmp/pm_11133222_rcfile -i", ); system qw{/usr/bin/xterm -e}, join ';', @commands; #### + pwd /home/ken/tmp + cd /home/ken + pwd /home/ken + date Wed, 2 Jun 2021 16:38:27 + /usr/bin/bash --rcfile /home/ken/tmp/pm_11133222_rcfile -i ken@titan ~/tmp/pm_11133222_test_dir $