I want to repeatedly run multiple commands at a time interval using a script. I tried this
----------------test_script--------------- while true;do ls -l >>output.txt sleep 3 done while true;do cat file.txt sleep 5 done i want to run both while loops at same time .When i run the above script ,only first while loop is running and the output of ls -l is redirected to the file .How i can execute both while loops simultaneously from the script
lsandcatin the samewhile.&to run a command in background.