Why do not this work? It finds all the other files but not this one. The only difference is that it has numbers in its name.
awk -F= '$1=="Icon" {print $2}' "/usr/share/applications/hildon/dropn900.desktop"
The file it uses..
[Desktop Entry] Version=1.0.0 Encoding=UTF-8 Name=DropN900 Comment=Python based DropBox client Exec=/opt/dropn900/dropn900.py Icon=dropn900 X-Icon-path=/usr/share/icons X-Window-Icon=dropn900 Type=Application X-Osso-Type=application/x-executable
It should give me the output of "dropn900" but doesn't.
If i do as suggested below..
awk -F= '$1==" Icon" {print $2}' "/usr/share/applications/hildon/fapman.desktop"
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=Faster Application Manager Exec=fapman.launch Icon=fapman X-Osso-Type=application/x-executable X-Osso-Service=org.maemo.faster_application_manager Categories=System;
This will not show..
The one suggested by Dennis gave the output.
dropn900 /usr/share/icons dropn900
But i need just "dropn900" or the script will not work.