Sponsored Content
Full Discussion: Hostsfile generator
Top Forums Shell Programming and Scripting Hostsfile generator Post 303041021 by Marti95 on Tuesday 12th of November 2019 10:08:39 AM
Old 11-12-2019
Quote:
Originally Posted by RudiC
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

perfect!
Now its working
 

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
VCD-INFO(1)							   User Commands						       VCD-INFO(1)

NAME
vcd-info - manual page for vcd-info 0.7.24 SYNOPSIS
vcd-info [OPTION...] DESCRIPTION
-a, --access-mode=ACCESS set CD-ROM access mode (IOCTL, READ_10, READ_CD) -b, --bin-file[=FILE] set "bin" CD-ROM disk image file as source -c, --cue-file[=FILE] set "cue" CD-ROM disk image file as source -N, --nrg-file[=FILE] set Nero CD-ROM disk image file as source --toc-file[=FILE] set "toc" CD-ROM disk image file as source -i, --input[=FILE] set source and determine if "bin" image or device --no-ext-psd ignore information in /EXT/PSD_X.VCD --sector-2336 use 2336 byte sector mode for image file -C, --cdrom-device[=DEVICE] set CD-ROM device as source -d, --debug=INT Set debugging output to LEVEL -t, --terse same as --no-header --no-banner --no-delimiter -B, --no-banner do not show program banner header and RCS version string -D, --no-delimiter do not show delimiter lines around various sections of output -H, --no-header do not show section header titles --show-entries=STRING show specific entry of the ENTRIES section -E, --show-entries-all show ENTRIES section -F, --show-filesystem show filesystem info --show-info=STRING show specific entry of the INFO section -I, --show-info-all show INFO section -L, --show-lot show LOT section -p, --show-psd show PSD section(s) -P, --show-pvd-all show PVD section(s) --show-pvd=STRING show a specific entry of the Primary Volume Descriptor (PVD) section -s, --show-scandata show scan data -X, --show-search show search data -S, --show-source show source image filename and size -T, --show-tracks show tracks -f, --show-format show VCD format (VCD 1.1, VCD 2.0, SVCD, ...) -q, --quiet show only critical messages -V, --version display version and copyright information and exit Help options: -?, --help Show this help message --usage Display brief usage message AUTHOR
Written by Herbert Valerio Riedel and Rocky Bernstein. http://www.gnu.org/software/vcdimager/ COPYRIGHT
Copyright (C) 2000-2003 Herbert Valerio Riedel <hvr@gnu.org> 2003 Rocky Bernstein <rocky@panix.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for vcd-info is maintained as a Texinfo manual. If the info and vcd-info programs are properly installed at your site, the command info vcd-info should give you access to the complete manual. vcd-info 0.7.24 March 2011 VCD-INFO(1)
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy