Shell Script Needed (Linux)
Budget: $25 – $35 USD
I need a shell script (for linux) that does the following:
1) For the directory in which the script is run, it looks for all FOLDERS whose names start with "aaa-" or "aab-"
2) For each matching folder, the script then gets those folders' directory listings.
*Just one level, not recursive.
*Only include folder names, as well as files of type .txt, .doc, .rtf
*Not case sensitive on the file extensions, so also include .TXT, .DOC, .RTF
3) The script then creates a text file that looks like this:
<!-- Begin listing of /aaa-folder1 –>
myfile1.txt
myfile2.doc
/folderX
/folderY
<!-- End listing of /aaa-folder1 –>
<!-- Begin listing of /aaa-folder2 –>
myfileX.DOC
myfileY.RTF
/folderA
/folderB
<!-- End listing of /aaa-folder2 –>
4) The script then inserts the same data from #3 above into an existing file called "myfile.html". In that html file, the script replaces all content between:
<!-- Begin inserted data -->
and
<!-- End inserted data →
... with the same data as #3 above.
*All other content in myfile.html should be left unchanged.
Thank you for bidding!
1) For the directory in which the script is run, it looks for all FOLDERS whose names start with "aaa-" or "aab-"
2) For each matching folder, the script then gets those folders' directory listings.
*Just one level, not recursive.
*Only include folder names, as well as files of type .txt, .doc, .rtf
*Not case sensitive on the file extensions, so also include .TXT, .DOC, .RTF
3) The script then creates a text file that looks like this:
<!-- Begin listing of /aaa-folder1 –>
myfile1.txt
myfile2.doc
/folderX
/folderY
<!-- End listing of /aaa-folder1 –>
<!-- Begin listing of /aaa-folder2 –>
myfileX.DOC
myfileY.RTF
/folderA
/folderB
<!-- End listing of /aaa-folder2 –>
4) The script then inserts the same data from #3 above into an existing file called "myfile.html". In that html file, the script replaces all content between:
<!-- Begin inserted data -->
and
<!-- End inserted data →
... with the same data as #3 above.
*All other content in myfile.html should be left unchanged.
Thank you for bidding!