|
发表于 2005-9-28 21:30:41
|
显示全部楼层
perl code:
itpos:/home/richard/shellcode# cat ch.txt
1 3 5 7
a b c d
itpos:/home/richard/shellcode# cat foo.pl
#!/usr/bin/perl
$a=`cat ch.txt |sed 2d`;
chomp $a;
$b=`cat ch.txt |sed 1d`;
chomp $b;
@aa=split(/ /,$a);
@bb=split(/ /,$b);
for ($i=0; $i<=3;) {
print "$aa[$i] $bb[$i]\n";
$i++;
}
itpos:/home/richard/shellcode# perl foo.pl
1 a
3 b
5 c
7 d |
|