Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: adding wtmp script into logwatch

by NetWallah (Canon)
on Nov 30, 2011 at 04:03 UTC ( #940765=note: print w/replies, xml ) Need Help??

in reply to adding wtmp script into logwatch

It looks like you are invoking your script with 'perl', instead of a shell.

Since your script starts with 'perl -we', the containing file should be executed by a shell.

The other option is to get rid the the "perl -we '", and the terminating "'", then let it be invoked by 'perl'.

FYI - this is what invoking with perl looks like on Windows: (Note the similarity to your messages)

>perl -e "perl -we 'SomeJunk'" String found where operator expected at -e line 1, near "we 'SomeJunk' +" (Do you need to predeclare we?) syntax error at -e line 1, near "we 'SomeJunk'" Execution of -e aborted due to compilation errors.

            "XML is like violence: if it doesn't solve your problem, use more."

Replies are listed 'Best First'.
Re^2: adding wtmp script into logwatch
by hedkandi (Initiate) on Nov 30, 2011 at 09:09 UTC
    Hi netwallah I am using bash shell as root user on a suse linux i replaced perl -we with perl but it still gave me error:
    String found where operator expected at /usr/share/logwatch/scripts/s +ervices/my-report line 1, at end of line (Do you need to predeclare perl?) Warning: Use of "log" without parentheses is ambiguous at /usr/share/ +logwatch/scripts/services/my-report line 1. syntax error at /usr/share/logwatch/scripts/services/my-report line 1 +, next token ??? Search pattern not terminated at /usr/share/logwatch/scripts/services +/my-report line 1.
    About the terminating " " which one did u meant? is it this one?
    ;$recs = "";
      What I meant was : Get rid of the "perl -we" entirely.

      This includes the single quotes after "perl -we", and the matching one at the end of the program.

      The reason for this is that , for some reason, for this script, your system is invoking the perl interpreter automatically, instead of the expected bash (or other) shell. And 'perl' does not like a program content to start with 'perl -we'.

                  "XML is like violence: if it doesn't solve your problem, use more."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940765]
[oiskuu]: Discipulus, from the edge or from the top?
[Discipulus]: oiskuu from the top aka 0-0 coords
[LanX]: edge or node?
[oiskuu]: from each height difference, there's a fixed number of "moves right" - "moves left". So it's a number of combinations.
[Discipulus]: I already know how much distinct paths exists but to demonstrate the property i want to have them all
[oiskuu]: ie C(n, k); where n is height difference, k is position in the line
[Discipulus]: infact there are 70 distinct path to reach the tale wich holds 70
[Discipulus]: what i want is to compute them

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2018-03-19 11:05 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.