A bash script is a text file containing a list of commands to be executed by the bash shell. A long time back, I had written a guide on Bash scripting which teaches you the basic syntax of bash scripts in a mere 10 seconds.
There is a nice tutorial on the Scripting the vim editor
I liked it, hope you too like it.
Here\’s a one-liner to get the info on all the packages installed on your system.
rpm -qa –info |tee All_rpms_Info
This is what it does, when you query the rpm database with the –info parameter, then the output looks something like the below, which is quite helpful.
Name : rpm Relocations: (not relocatable)
Version : 4.6.0 Vendor: Fedora Project
Release : 0.rc3.1.fc10 Build Date: Sat 13 Dec 2008 12:38:24 AM IST
Install Date: Tue 13 Jan 2009 09:22:50 PM IST Build Host: x86-5.fedora.phx.redhat.com
Group : System Environment/Base Source RPM: rpm-4.6.0-0.rc3.1.fc10.src.rpm
Size : 3662666 License: GPLv2+
Signature : DSA/SHA1, Tue 06 Jan 2009 08:20:24 PM IST, Key ID bf226fcc4ebfc273
Packager : Fedora Project
URL : http://www.rpm.org/
Summary : The RPM package management system
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.
So, this is probably much more useful info. All the output is displayed on the terminal as well as written in the file called All_rpms_info. 🙂