I trying write a program with bash file that create a text file then write the List of running programs file in the text file. I created a text file with bash that name is test.txt, how can I write List of running programs in the text file? I put my code here:
#!/bin/bash
cat test.txt