-2

I found this perl script online but I don't know how to use it. When I run it it opens up an empty terminal. I don't know what to put in to the terminal to make it work.

The script can be found here: http://www.ve3syb.ca/software/gimp/script-update.pl

Thank you so much for your help.

caoran9238
  • 13
  • 2

2 Answers2

3

well, the help-text in the script says this:

    print "Usage: $0 [-h|--help|-from xx|-to yy]\n";
    print "       -from xx  Script was written for version xx of GIMP\n";
    print "       -to yy    Output script for use with version yy of GIMP\n";
    print "\n";
    print "GIMP version number should be one:\n";
    print "     10, 12, 20, 22, 24, or 26\n";
    print "\n";
    print "       The script to be updated is read from stdin.\n";
    print "       The updated script is written to stdout.\n";
    print "\n";

call it like this:

./script.pl -from XX -to YY < input > output
Fredrik Pihl
  • 44,604
  • 7
  • 83
  • 130
1

The usage instructions are in the script, they tell you how to use it. Note especially the bit about the script to be updated being read from stdin - so you'll probably need to redirect or pipe a script into it.

   if ($arg eq "-h" || $arg eq "--help")
    {
        print "Usage: $0 [-h|--help|-from xx|-to yy]\n";
        print "       -from xx  Script was written for version xx of GIMP\n";
        print "       -to yy    Output script for use with version yy of GIMP\n";
        print "\n";
        print "GIMP version number should be one:\n";
        print "     10, 12, 20, 22, 24, or 26\n";
        print "\n";
        print "       The script to be updated is read from stdin.\n";
        print "       The updated script is written to stdout.\n";
        print "\n";
        exit;
    }
Roger
  • 15,793
  • 4
  • 51
  • 73