I currently have multiple scripts that I use to scan my server for certain files and content. I was wondering if somebody can help me take the output of that script and extract the username for me so that I can run.
Here is the code I am currently using:
/usr/bin/find /home/*/public_html/ -iname *.bz2 -type f >> /var/log/alog.txt
Here is an example of the output:
I want to have the script still output the original results but to also extract the username so that I can take the usernames and automatically suspend the accounts using the same bash script.