목록Open (3)
준호씨의 블로그
라인수가 많지 않으면 cat 결과를 array 에 넣어서 읽으면 됩니다. my @lines = `cat file.txt`; for my $line (@lines) { print $line; } 라인수가 많으면 file open 을 이용합니다. #!/usr/bin/env perl use strict; use warnings; my $file = "file.txt"; open my $info, $file or die "Could not open $file: $!"; while (my $line = ) { print $line; } close $info;
Sometimes we want to know a specific port is open or not. check 80 port of google.com $ tcping google.com 80 google.com port 80 open. check 8080 port of daum.net $ tcping daum.net 8080 daum.net port 8080 closed. check 25 port of mta5.am0.yahoodns.net $ tcping mta5.am0.yahoodns.net 25 mta5.am0.yahoodns.net port 25 open. If you want to use it on a Mac, install it first. $ brew install tcping