I would like to capture output from two commands to a test file on the same line...
I want to get a file with all Applications and the Version of it...here are the two commands I use to get the output.
To get Application list I use
ls -1 /Applications/ |grep .app >> ~/Desktop/InstalledApps.txt
Also Maybe someone can help Add searching sub directories too.
If possible I would like to write to line at a time and not have to worry about editing it or issues with merging data. At some point I will take the time to create a mysql database, but just want a simple text file for now.
Sample Output Should be....
Address Book.app 4.1.1
Calculator.app 4.2
This sounds like a search on an iPhone because I know they use .app. I use Fedora and Redhat and we don't have any .app but if you have your /etc/snmp/snmpd.conf defined you can snmpwalk for "HOST-RESOURCES-MIB::hrSWInstalledName" and this will list the package and version information your looking for. For info on setting up the /etc/snmp/snmpd.conf check out Quick HOWTO : Ch22 : Monitoring Server Performance - Linux Home Networking
you can also do this on a redhat system with 'rpm -qa'
This is for Mac OSX 10.5.5 Leopard.
But it's really a very generic question about merging data from two files and setting up variables. I actually will use this to search for the Applications only 2 directories in...