Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default sh: bad number

    Hi,
    I compiled a simple program with perl. But I ran into some problems.

    sh: campusUnderAttack.out: bad number

    I try to execute a program and input the result to antother file
    "campusunderAttack.out"
    like this:

    #!/usr/bin/perl
    #
    # Run campus scenario and plot result
    #

    #run 'campus network under attack'
    print STDERR "Running campus under attack scenario...\n";
    #`java SSF.Net.Net 57600 campusUnderAttack.dml >& campusUnderAttack.out`;

    I executed this program under Unix (sun) with bash shell.

    Thanks,

    wenpeng

    __________________________________________________ _______________
    Tired of spam? Get advanced junk mail protection with MSN 8.
    [url]http://join.msn.com/?page=features/junkmail[/url]

    But However Guest

  2. Similar Questions and Discussions

    1. int Number to text Number Function / UDF ?
      Is there a function that converts e.g. 3 to Three? Probably not but I just thought I'd ask.
    2. Number to hex ?
      Looking at a few scripts, too disguise ID numbers or make them random, there appears to be a conversion to an alphanumeric number. e.g....
    3. sort from the smallest number to the highest number
      Hi Just say I want to sort the row by using the fifth column data as reference from the smallest the largest number, if using sort, It will give...
    4. Number formatting?
      Any convenient ways (without rolling my own) of formatting numbers to include thousands separators, e.g. 1199123 printed as "1,199,123" --...
    5. tty-dev-number <-> /dev/pts
      Hi, I'm writing a program under Solaris (sparc) that has to know from what machine a user is logged on who is starting that program. Reading...
  3. #2

    Default Re: sh: bad number


    On Friday, Nov 21, 2003, at 02:21 US/Pacific, but however wrote:
    > Hi,
    > I compiled a simple program with perl. But I ran into some problems.
    >
    > sh: campusUnderAttack.out: bad number
    >
    > I try to execute a program and input the result to antother file
    > "campusunderAttack.out"
    > like this:
    >
    > #!/usr/bin/perl
    > #
    > # Run campus scenario and plot result
    > #
    >
    > #run 'campus network under attack'
    > print STDERR "Running campus under attack scenario...\n";
    > #`java SSF.Net.Net 57600 campusUnderAttack.dml >&
    > campusUnderAttack.out`;
    >
    > I executed this program under Unix (sun) with bash shell.
    [..]

    I think you may have more than a few issues here.

    i'm not at all sure what you mean by

    'compiled a simple program with perl'

    nor how exactly you tried to run it.

    so you may need to provide us with a whole lot more details
    about

    a. what you did
    b. how you did it
    c. what issues you really need answered.


    ciao
    drieux

    ---

    Drieux Guest

  4. #3

    Default Re: sh: bad number

    But However wrote:
    >
    > Hi,
    Hello,
    > I compiled a simple program with perl. But I ran into some problems.
    >
    > sh: campusUnderAttack.out: bad number
    >
    > I try to execute a program and input the result to antother file
    > "campusunderAttack.out"
    > like this:
    >
    > #!/usr/bin/perl
    > #
    > # Run campus scenario and plot result
    > #
    >
    > #run 'campus network under attack'
    > print STDERR "Running campus under attack scenario...\n";
    > #`java SSF.Net.Net 57600 campusUnderAttack.dml >& campusUnderAttack.out`;
    ^^
    It looks like your problem is using '>&', did you mean to use '>'
    instead?


    John
    --
    use Perl;
    program
    fulfillment
    John W. Krahn Guest

  5. #4

    Default Re: sh: bad number

    but however wrote:
    > Hi,
    > I compiled a simple program with perl. But I ran into some problems.
    >
    > sh: campusUnderAttack.out: bad number
    >
    > I try to execute a program and input the result to antother file
    > "campusunderAttack.out"
    > like this:
    >
    > #!/usr/bin/perl
    > #
    > # Run campus scenario and plot result
    > #
    >
    > #run 'campus network under attack'
    > print STDERR "Running campus under attack scenario...\n";
    > #`java SSF.Net.Net 57600 campusUnderAttack.dml >& campusUnderAttack.out`;
    >
    > I executed this program under Unix (sun) with bash shell.
    >
    > Thanks,
    >
    > wenpeng
    I'm a little unclear on the problem here. It doesn't seem to be a Perl
    issue. I tried the Perl code from the above, and it gave exactly the output
    I would expect:

    Greetings! E:\d_drive\perlStuff>perl -w
    print STDERR "Running campus under attack scenario...\n";
    ^Z
    Running campus under attack scenario...

    Greetings! E:\d_drive\perlStuff>

    Are you trying to mix shell and Perl?

    Joseph

    R. Joseph Newton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139