⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gengetopt-to-shell.pl

📁 Path MPICH-V for MPICH the MPI Implementation
💻 PL
字号:
#!/usr/bin/perl -wopen(GGO, "<$ARGV[0]") or die "could not open $ARGV[0] : $!\n";print "#!/bin/sh\n";print "\n";print "case \$arg in\n";$help="";while(<GGO>){    $line = $_;    next if($line =~ /\"n-procs\"/);    if(($opt, $commentary) = ($line =~ /^option +\"([^\"]*)\" +. +\"([^\"]*)\" +flag/) )    {	print "    -chv-$opt)\n";	print "       chvOptions=\"\$chvOptions --$opt\"\n";	$opt =~ s/-/_/g;	print "       chv_$opt=\"1\"\n";	print "       device_knows_arg=1\n";	print "    ;;\n";	$help .= "  -chv-$opt\n    $commentary\n";    } elsif( ($opt, $commentary, $typestr) = ($line =~ /^option +\"([^\"]*)\" +. +\"([^\"]*)\".*typestr=\"([^\"]*)\"/) )    {	print "    -chv-$opt)\n";	print "       chvOptions=\"\$chvOptions --$opt=\\\"\$1\\\"\"\n";	$opt =~ s/-/_/g;	print "       chv_$opt=\"\$1\"\n";	print "       shift;\n";	print "       device_knows_arg=1\n";	print "    ;;\n";	$help .= "  -chv-$opt <$typestr>\n    $commentary\n";    } } print "    -usage | --usage)\n";print "cat <<EOF\n";print "  Special Options for ch_v device\n";print "$help\n";print "EOF\n";print "esac\n";close(GGO);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -