Hack Forums
[Shell] [Bash] Can anyone help me create a quick bash script? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] [Bash] Can anyone help me create a quick bash script? (/showthread.php?tid=6029699)



[Bash] Can anyone help me create a quick bash script? - .eXe - Dec 2, 2019

I need to create a list of files with their MD5 sums in this format:

proprietarfiles.txt

Effectively the script needs to recursively run through folder and list the files as well as the directory it's in (along with its parent(s)).


RE: [Bash] Can anyone help me create a quick bash script? - Thomas Saison - Dec 2, 2019

A simple recursive bash script; adapt it with your md5 function.


function md5()
{
#Your md5 function
}

function rec()
{
for file in $1*
do
if [ -d $file ];
then
rec $file/
else
md5
fi
done
}

rec ~/