Question: # ! / usr / local / bin / bash for filename in . / * do basefilename = $ ( basename -

#!/usr/local/bin/bash
for filename in "."/*
do
basefilename=$(basename --"$filename")
IFS='_' read -ra FNAME <<<"$basefilename"
username=${FNAME[0]}
echo "$username"
done
Using this ghost shell, how can I make the script that unpack contents of each top-level ZIP archive in the current directory, one at a time into a new subdirectory named after the original archive. In the subdirectories, extract and identify each individual archives. These archives should be extracted into directories named after students username. Repeat for every student archive inside the current subdirectory, non-archive files should be ignored. After each individual archive has been extracted to a folder, the original archive file can be deleted. Repeat for every top-level ZIP archive in the current directory, once all top-level archives have been extracted, the script may exit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!