Advertisement
kkDav1337

How to call any function in Bash with Loop

Oct 6th, 2021
3,750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. #!/bin/bash
  2. while true; do # <- Loop function
  3. test(){ # Your Function
  4. echo "Call test function"
  5. }
  6. echo "After this we will call the function test()" # Random text/notification
  7. test # Call function
  8. sleep 5 # Sleep timer
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement