Put it all Together

This is just a quick article that may show one of the reasons I write this material. We’re just going to put together a couple of pages from this site in an example of real-world use.

So, if you remember, I told you how to use dpkg to get a list of installed applications. The command I used on that page was:

Well, the output from that is more information than I really need. It looks like this:

That’s plenty informative – but I want just the name of the applications. Sure enough, we can use ‘AWK‘ to do this. 

On that page, we have this command:

So, let’s mix the two together! We can do that!

Let’s see… I’ll obviously need to change the paths and file names. Coincidentally, I’ll not need to change the column (the bit about { print $2 }) because I still want the second column. 

What does it end up looking like?

Now, navigate to your documents folder and open InstalledApps.txt with your favorite text editor. You’ll see that it looks a bit like this:

You’ll still have some unwanted text at the top of the page, but it works well enough to get the job done. It’s reasons like that which motivate me to write this material.

Smash a Button
[Total: 1 Average: 5]
About Me: I'm just some retired dude with a little bit more free time on my hands. If you want to support the site, why not help yourself out too by ordering some inexpensive web hosting so that you can start your own site?


Linux Tips

This work is licensed under a Creative Commons Attribution 4.0 International License.
SITEMAP
Exit mobile version