From: Tech Geek on
So I downloaded the opera browser deb file -
opera_10.10.4742.gcc4.qt3_i386.deb. What I am trying to do is first find out
what all packages does this deb file depends on and then install those
packages first (using apt-get) and then finally install this deb file (using
dpkg -i opera_10.10.4742.gcc4.qt3_i386.deb).

Now on giving the command:

dpkg --info opera_10.10.4742.gcc4.qt3_i386.deb | grep Depends[

I get the following output:
Depends: libc6 (>= 2.1.3), xlib6g (>= 3.3.6) | xlibs | libxmu6, debconf (>=
0.5) | debconf-2.0, libqt3-mt (>= 3.3.4), libstdc++6
Now my question is what is the best way I can extract/list just the names of
the above packages (using awk, sed?) so that I feed the list to apt-get to
first install them and then run dpkg -i opera*

I know an apt-get -f install after the first attempt to install it would
take care of this but I am trying to automate this installation process
through a script also keeping in mind that the dependencies of opera package
might change in the future.

Alternatively, if anyone can suggest a better method on how to achieve that
would be great.

Thanks,

Tech Geek