Sponsored Content
Full Discussion: Hostsfile generator
Top Forums Shell Programming and Scripting Hostsfile generator Post 303041004 by RudiC on Tuesday 12th of November 2019 04:57:16 AM
Old 11-12-2019
Hmmm - I missed to post the necessary IFS modification. Try again with this slightly modified version:
Code:
IFS=$'\n'

for IN in $(echo "${!ENTRIES[*]}" | tr ',' '\n' | sort -un)
  do    [ ! "${IN/[A-Z]}" = "$IN" ] && continue
        printf "%s %s %s %s\n" "${ENTRIES[$IN",IP"]}" "${ENTRIES[$IN",HOST1"]}" "${ENTRIES[$IN",HOST2"]}" "${ENTRIES[$IN",COMMENT"]}"
  done

This User Gave Thanks to RudiC For This Post:
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

Password Generator

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)
Discussion started by: Perderabo
13 Replies

2. UNIX for Dummies Questions & Answers

date generator

Is there a command to generate the unix date that is in theshadow file?>? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

3. Shell Programming and Scripting

How to compare result lpstat with hostsfile

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)
Discussion started by: draco
0 Replies

4. Shell Programming and Scripting

Range generator

Dear All, I have a sorted file like 1 2 3 8 9 10 45 46 47 78 The output will be range like 1 3 8 10 45 47 78 78 (9 Replies)
Discussion started by: saifurshaon
9 Replies

5. Shell Programming and Scripting

Random Sentence Generator

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)
Discussion started by: kaushys
7 Replies

6. What is on Your Mind?

Barcode Generator

QR Code Generator (0 Replies)
Discussion started by: Neo
0 Replies

7. Shell Programming and Scripting

time generator

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)
Discussion started by: hernand
7 Replies

8. Shell Programming and Scripting

Sequence generator

Thanks Guys This really helped (5 Replies)
Discussion started by: robert89
5 Replies

9. Shell Programming and Scripting

Generator script

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)
Discussion started by: galford
7 Replies
SYNCACHE-DRB(1) 					      General Commands Manual						   SYNCACHE-DRB(1)

NAME
syncache-drb - SynCache dRuby object cache server SYNOPSIS
syncache-drb [ options ] [ URI ] DESCRIPTION
syncache-drb starts a Distributed Ruby server providing a SynCache::Cache object. SynCache::Cache is a thread-safe time-limited object cache with flexible replacement strategy. OPTIONS
URI A URI with druby: schema that the DRb server binds to, default is druby://localhost:9000 --help Display usage information and quit. --ttl SECONDS Time-to-live value for cache entries, default is 24 hours. --size ENTRIES Maximum number of objects in cache, default is 10000. --flush-delay SECONDS Rate-limit flush operations. If less than that number of seconds has passed since last flush, next flush will be delayed. Default is no rate limit. --user USER Run as USER if started as root. Default is nobody. --error-log ERROR_LOG_PATH File to write errors to. Default is /dev/null. When run as root, the file is chowned to USER:adm. --debug Enable debug mode. If an error log is specified with --error-log, all messages will be sent there instead of syslog. --pidfile PATH Path to pidfile. By default, pidfile is created under /var/run/syncache-drb/ when run as root, or under $TMPDIR otherwise. Location should be writeable by USER. AUTHOR
This manual page was written by Dmitry Borodaenko <angdraug@debian.org>. Permission is granted to copy, distribute and/or modify this doc- ument under the terms of the GNU GPL version 3 or later. SYNCACHE-DRB(1)
All times are GMT -4. The time now is 07:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy