Volumes unzip files

vannipart
New Contributor III

I have this shell unzip that I use to unzip files 

%sh
sudo apt-get update
sudo apt-get install -y p7zip-full
 
But when it comes to new workspace, I get error 
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required Reading package lists... E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? bash: line 7: 7z: command not foundHow could I unzip files with volumes, If I already have them there ? 

should I make a shell init script to do that or how ? 

The files are password protected 
The unzip that worked 

%sh for file in /dbfs/mnt/zip/$source/*.zip do 7z x "$file" -p$pw -o/dbfs/mnt/zip/$source/unzipped/ -y done
Any good ideas welcome 🙂