Please provide sample-data with sensitive data stripped off(if necessary), show the desired output, explain the steps how you want the data to be created and show the steps you did yourself so far. Please use
```text
...
```
Tags to make your code easily readable for potential helpers.
I just need to create a file with the list of active processes until the file himself his killed. The choises are made from a menu in another bash file. I'm not sure how to do it beacuse I'm new in shell scripting.
In the .csv file every line in composed by: user;pid;command;start;cputime but I know how to cut every information to compose every line. The only thing i need is to know how can i copy active processes in a file named like this.
The difficulty for me is to understand the commands i must use to:
copy the list of active processes in a file
name the file with date and time like i explain before
In particular: i have a menu with different choises. Every choise is a script.
The choise number 1 is: saving the list of active processes on the pc. The script periodically saves them (using sleep command) in a .csv file named report_<date>_<time>.csv.
<date> and <time> are the date and the time of the system when you create the file .csv
Every line of the .csv file reports an active process. For every process must be specify the following information, in this order:
{ USER; PID; COMMAND; START TIME; CPU TIME }
COMMAND : name of the process without parameters
START TIME : "HH:MM:SS"
CPU TIME : [DD-]hh:mm:ss
---------- Post updated at 09:25 AM ---------- Previous update was at 09:23 AM ----------
It's not an homework for school, i'm tring to do a program to understand how processes commands works and also i/o redirection, but i have some difficulties
Then show us what you have tried and explain what you are unable to figure out.
If you show us what you have tried, we'll all have a much better understanding of where you are stuck and have a better chance of helping you expand on what you have already learned.