[SOURCE CODE: shell script] Redline Log Compress/Sortee

hrtdSkrypt

Lurker
Member
Joined
Threads
1
Posts
3
It's basically noob friendly but it doesn't sanitize input. Bash script to work more efficiently with Redline log dumps. Test your personal info more easily after cleaning up thousands of directories which are not great for the hard disk

Use: ./ZSTline.sh [dir]

Where dir is the root folder of decompressed logs.

NOTE : don't trail the input directory with a forward slash.

It's pretty raw and far from polished. May be useful to someone.

Code:
~ $ cat ZSTline.sh
#/usr/bin/env bash

# ZSTline.sh - Custom REDLINE log sorting script
# ----------
#
# Usage: ./ZSTline.sh [dir]
#
# Expectations: [dir] is decompressed REDLINE archives.
# IMPORTANT - I'm lazy, ensure [dir] doesn't have a trailing '/'.
#             No input checking here.
#
# Result: All text files for each set of logs will be combined into one text
#         file  and  compressed  using  zstd.  This  file  is greppable  via
#        'zstdgrep'. Files compressed are removed from disk.The archive name
#         is $DIR.lst.zst,cause I'm too lazy to   echo "$(pretty_name $DIR)"
#         Remaining  files   many  of   which  are  binary,  are  zipped  in
#         $DIR.binary.zip. These files  are then  added  to  one  collective
#         file $DIR.binary.zip located in the  directory the  script is  run
#         from. It  contains  all subfolders  with all binary data excluding
#         text data.
#
# WHY?:   Cause it's neater, it  takes less  space, it's more  efficient, it
#         won't crash your UI when you accidentally load a folder with  like
#         100k folders... Easily extendible.
#
# TODO?:  No intention on noob proofing this, it's forward enough and can be
#         edited as need be.
#
#                             **  DISCLAIMER **
# Written with intent only to assist others in effectively testing their own
#                 accounts/names/etc on publicly released logs.
#
#                                                                   DtRH.net
# --------------------------------------------------------------------------

Shell Script:
You must reply to see the hidden content. Consider upgrading your account to increase your reply limit.


Detailed Log:
You must reply to see the hidden content. Consider upgrading your account to increase your reply limit.


Script + Demo Data and Log
You must reply to see the hidden content. Consider upgrading your account to increase your reply limit.
 
thanks bro, I think it can be improved using AI but I don't know, I'll try it first.