Hi,

I know this must be something simple, but I can't quite see it.

my $my_DIR = dirname("$my_FILE"); my $my_tmp_file = basename("$my_FILE"); my @my_output = `cd $my_DIR; $my_SCCS edit $my_tmp_file`; print "<h2>@my_output</h2><br>\n"; my @my_output = `echo "cd $my_DIR; $my_SCCS edit $my_tmp_file"`; print "<h2>@my_output</h2><br>\n";

Produced the following output:
===========

"interfaces2.dat" [Read only] [Incomplete last line] 68307 lines, 2045 +312 characters (262672 null) cd /data; /usr/ccs/bin/sccs edit interfaces2.dat
==========

It is running edit interfaces2.dat and skipping the sccs entirely. The edit command is being picked up in /usr/bin/edit (text editor).

I did find this but I get the same result of skipping the sccs.

Running the script from command line executes fine. So something in the environment but don't know what.

Any ideas?

Jason L. Froebe

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Update

If I hardcode the /usr/ccs/bin/sccs, it works fine. So $my_SCCS isn't being resolved before execution.

my @my_output = `cd $my_DIR; /usr/ccs/bin/sccs edit $my_tmp_file`; print "<h2>@my_output</h2><br>\n";

Unforunately, hardcoding sccs would be a workaround and not a solution as it will be on several machines and there is no guarantee that it will be in /usr/ccs/bin or that we will be on solaris (could be using the free cssc clone of sccs).


In reply to calling sccs from cgi-bin script by jfroebe

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.