Situation: I have a tool/command (tool.pl) that accepts max 5 hostnames as @ARGV. I have a file that contains hostnames, each host in a newline. There are 12 hosts in the file. How can I split the hostnames in the file to pass them to tool.pl with 5 hostnames as arguments
host1 host2 host3 host4 host5 host6 host7 host8 host9 host10 host11 host12
During the first iteration expected
tool.pl host1 host2 host3 host4 host5Second iteration
tool.pl host6 host7 host8 host9 host10Third iteration
tool.pl host11 host12Thanks for the help in advance
In reply to split on every n lines by sunil9009
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |