#!/usr/bin/perl # HSPICEで.print出力したデータを抽出するPerlスクリプト # created by ugd555 # 2004.12.22 if (@ARGV < 2){ die "please write down input and output file name" } open(IN, $ARGV[0]) || die "$ARGV[0] : $!"; open(OUT, ">$ARGV[1]") || die "$ARGV[1] : $!"; while (){ if(/\bx\b/ .. /\by\b/){ @el = split(/\s+/,$_); # if($el[0] =~ /\bx\b/ | $el[0] =~ /\bx\b/){ # print OUT "\n"; # next; # } if($el[1] !~ /[a-z0-9]+/i){ next; } print OUT "$el[1] $el[2]\n"; } } close(IN); close(OUT);