Let’s Count the Installed Packages!

how to use ‘dpkg’ to get a list of installed applications. It was a pretty simple command.

Now, you could try this:

[code]cat Documents/installed_apps.txt | grep ii | wc -l[/code]

cat‘ stands for concatenate. It has been around since pretty much Unix v. 1. It basically reads a file and spits out the content. The man page describes it as thus:

See? Pretty simple.

[code]dpkg -l | grep ii | wc -l[/code]

pipe. You’ll see it fairly often. It’s used to take the commands from one command and use them in another. It goes back to the philosophy of ‘hiding the internals’, with the goal being simplicity and clarity. But, you never have to make the text file to perform this counting exercise.