you are exprienced sysadmin and you have server where react apps are running, 
we need to create a csv file which will contain information about which app from which user at which domain are used 
we have root access to the server and we have pm2 tool installed on the server 
How we can create bash script which would generate this information 
Domains where react app is running have following paths pattern 
/home/{user}/domains for example 
/home/{user}/domains/domain1
/home/{user}/domains/domain1

real output from the server 
pwd
/home/u-kyle/domains/

u-kyle@dev:~/domains$ ls -al
total 16
drwxr-xr-x  4 u-kyle u-kyle 4096 Apr  3 08:30 .
drwxr-x--- 24 u-kyle u-kyle 4096 Mar 28 14:50 ..
drwxr-x--- 11 u-kyle u-kyle 4096 Apr  3 09:37 api-gateway-nest.alphak.react.boldporch.com
drwxr-x--- 11 u-kyle u-kyle 4096 Mar 18 15:36 broker-onboarding.alphak.react.boldporch.com

for each domain we also have .env file where port information is presented in PORT variable 
like this 
PORT=15000

Suggest a solution, script will run from root user, so have access to any folder on the server 

