Answer the question
In order to leave comments, you need to log in
A non-root user cannot execute the script, what is wrong in the script?
good afternoon, I just started to study unix, tell me what's wrong.
when the script is executed by a non-root user, it writes a permissions denied error, help me figure out where I screwed up =)
#!/bin/bash
for i in $(free > /home/restar/logs/memory.txt | cat /proc/stat > /home/restar/logs/cpu.txt) {1..10}
do
sleep 1
done
for ii in $(cat /var/log/messages > /home/restar/logs/messages.txt | journalctl -p err > /home/restar/logs/erors.txt) {1..10} #
do
sleep 1
done
for iii in $(ip a > /home/restar/logs/seti.txt) # без цикла будет проще?
do
sleep
done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question