2011-07-04 39 views

回答

3

好,在腳本的幫助下,文中說的:

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"; 

調用它像這樣:

./script.pl -from XX -to YY <input> output 
1

使用說明在腳本中,它們告訴你如何使用它。尤其要注意的是,要從stdin中讀取要更新的腳本的位 - 所以您可能需要重定向或管理腳本。

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; 
    }