I creat the hosts file with this command:
I would like to format the file so that the distances are even (sometimes there is a bigger gap between IP and hosts1, between hosts 1 and hosts 2, ...).
Also, I do not want to use tabs because this causes problems.
I dont want to use tabs. Because the hostsfile can't get read correctly with tabs.
Also is the problem that the spaces between [IP] [HOST1] [HOST2] is not the same for each line. Maybe once is [IP] (2 spaces) [Host1] next line [IP] (4 spaces) [Host1]
Quote:
The element count per leading number seems to vary?
yes the Index is vary, and createt by ip address to sort it easy.
Quote:
The hosts file doesn't come from the array above?
It comes from the array, but the array I quoted has diffrent text.
Thanks for your answer. But this does not work ...
It does, as you can see in my post.
- What's your result with the array shown in post #1?
- What exactly does your array look like (index / element)?
- What's yoour bash version?
Run the code with the -x (--xtrace) option set and post the output.
Hello again unix.com people,
I need your help again. I'm currently need a script that will generate ip ranges... lets say from 64.1.1.1 to 74.255.255.255 and the output should be like this:
64.1.1.2
64.1.1.3
.............
.............
74.255.255.254
74.255.255.255
(line-by-line)
... (7 Replies)
Hi experts,
I'd like to generate the table/file containing:
number of milliseconds elapsed since midnight till midnight.
It should contain 5 columns (hours minutes seconds milliseconds):
Table will have theoretically 86 400 000 rows.
My question is , is there somewhere the file or source... (7 Replies)
Hi,
I need to create a table with random sentences. I need lines that are upto 1000 characters in lenght. I need a random sentence generator that will create sentences and output it to a text file. The sentences should be of lenght varying from 1 to 1000.
Does anyone know how this can be... (7 Replies)
Hi there all,
I got a long list of printers installed and a longer list of printers in my hosts file.
In the hosts file I got a even longer list of printers
in the hosts file I got the IP adress of all printers next to the printer name.
How can I get a script working to get the printers... (0 Replies)
I need a great Password Generator program. I looked at a few of them, but none of them seemed to be what I wanted. So I have decided to write my own. (That's the cool thing about being a programmer....I always get what I want in software :) )
Do you have any password generators that you... (13 Replies)