Thread: Simplifying a Chrome channels' versions script
so hi.
wrote simple script check latest version strings of 3 chrome channels:
which produces:code:#!/bin/bash cd /tmp curl -so http://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/other.xml.gz gzip -df other.xml.gz echo; echo -n "stable: " grep '\-stable' other.xml | cut -d " " -f6 | cut -d '"' -f2; echo echo -n "beta: " grep beta other.xml | cut -d " " -f6 | cut -d '"' -f2; echo echo -n "unstable: " grep unstable other.xml | cut -d " " -f6 | cut -d '"' -f2; echo rm other.xml
my question is: there way(s) simplify further (e.g. using awk or loop 3 channels or something)?code:stable: 21.0.1180.81 beta: 22.0.1229.14 unstable: 23.0.1243.2
code:$ awk -f\" '/pkgid/{ sub(".*-","",$4); print $4": "$10 }' other.xml stable: 21.0.1180.81 beta: 22.0.1229.14 unstable: 23.0.1243.2
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Simplifying a Chrome channels' versions script
Ubuntu
Comments
Post a Comment