For one of my Linux applications, I have the application binary, a launcher.sh script (for the LD_LIBRARY_PATH) and a .desktop file, all in the same folder.
I\'d like to
You can use echo $(echo ~) to use command output or echo $(echo $var) for variables
echo $(echo ~)
echo $(echo $var)
For example:
echo "Icon=$(echo ~)/Pictures/Icons/whatsapp-webapp.svg" > path/to/file.desktop
If you are interested in multi line echo command check out this link