Create file and paste contents then make the script executable
gedit get_package-contents.sh
chmod 755 get_package-contents.sh
---------------- get_package-contents.sh ---------
#!/bin/bash
a=geany
echo “—– ${a} —–” > get_${a}_contents.txt
dpkg-query -L geany >> get_${a}_contents.txt
gedit ./get_${a}_contents.txt