blog.tnez.dev

Looping in Fish Shell

Looping Forever

Do something again and again, sleeping for 30 seconds in between until you break the process.

while true;
  echo "Hello Again";
  sleep 30;
end

Looping a specified number of times

Loop for 10 times.

for i in (seq 1 10);
  echo "Loop number $i";
end
← Back to Home