I wish to run this script as sudo from BASIC
cat /home/neill/Documents/get_package_list_in_file.sh
#!/bin/bash
## dpkg -l > /home/neill/Documents/pkg.txt
dpkg -l > $1
neill@HDD-Mint-64:~$ echo "mypassword " | sudo -S /home/neill/Documents/get_package_list_in_file.sh /home/neill/Documents/pkg.txt
[sudo] password for neill: neill@HDD-Mint-64:~$
Edit (Opaque): Put script text into preformatted text attribute for readability reasona. No changes to content.