Posts

Showing posts from April 18, 2019

Berrigan, New South Wales

Image
[dummy-text] Berrigan, New South Wales From Wikipedia, the free encyclopedia Jump to navigation Jump to search Town in New South Wales, Australia Berrigan New South Wales Chanter Street, Berrigan, looking west; the main street of Berrigan contains a mix of Federation and more-modern architectural styles. Berrigan Coordinates 35°38′0″S 145°48′0″E  /  35.63333°S 145.80000°E  / -35.63333; 145.80000 Coordinates: 35°38′0″S 145°48′0″E  /  35.63333°S 145.80000°E  / -35.63333; 145.80000 Population 1,260 (2016 census) [1] Postcode(s) 2712 Elevation 119 m (390 ft) Location 647 km (402 mi) SW of Sydney 302 km (188 mi) N of Melbourne 122 km (76 mi) W of Albury 36 km (22 mi) N of Cobram 22 km (14 mi) E of Finley [2] LGA(s) Berrigan Shire County Denison State electorate(s) Murray Federal Division(s) Farrer Mean max temp Mean min temp Annual rainfall 22.9 °C 73 °F 9.2 °C 49 °F 448.1 mm 17.6 in Berrigan / ˈ b ɛr i ɡ ən / [3] is a town on the R

How can I loop through a list, ignoring some elements in the list?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box; 1 I have two lists, which my script loops through. I want to use only the VMs in the lists and ignore the hosts. The list size and order may very so I can't use indexes. I How might I do this? Currently I am looping through all elements, which is not desired as HOSTS are not in hosts file as they are in DNS. production=(VM01 VM02 VM03 HOST01 HOST02) staging=(VM04 VM05 VM06 HOST03 HOST04) for host in $production[@] $staging[@] do if [[ ! `grep $host /etc/hosts` ]] then echo "$host is not in /etc/hosts file. Exiting." exit fi done bash shell share | improve this question edited Nov 14 '18 at 7:52 mickt asked Nov 14 '18 at 7:30 mickt mickt 14 5 add a comment  |  1 I have two lists, which my script loops through. I want