Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Your post is virtually unreadable. Why did you post it like this? Surely you saw this in the initial preview along with the message: "If something looked unlike you expected it to you might need to check out Writeup Formatting Tips". Please follow that link and also read "How do I post a question effectively?" before posting again.

I created a new directory ~/tmp/pm_11133222_test_dir and this file:

ken@titan ~/tmp $ cat > pm_11133222_rcfile . ~/.bashrc cd ~/tmp/pm_11133222_test_dir

I modified the script I originally gave you. It's now:

#!/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;

When I run that, I get an xterm window with this content:

+ 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 $

All of my previous comments about the script being blocked and exiting from the xterm still apply.

— Ken

In reply to Re^3: perl scripting help by kcott
in thread perl scripting help by ejm20

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-03 09:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found