Skip to main content

Thread: Simplifying a Chrome channels' versions script


so hi.

wrote simple script check latest version strings of 3 chrome channels:

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
which produces:
code:
  stable: 21.0.1180.81  beta: 22.0.1229.14  unstable: 23.0.1243.2
my question is: there way(s) simplify further (e.g. using awk or loop 3 channels or something)?

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

Popular posts from this blog

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

using value from one form field in another form field

Thread: Request for help with configring Heads up display