0

Wish to ask if there is any ADB command feature to execute same command repeatedly after a mentioned interval. like watch command for linux

eg

  ls -l to execute repeatedly after every 20 second.
tomtom
  • 345
  • 2
  • 15

1 Answers1

4

You can use an unconditional loop:

while true; do ls -l; sleep 20; done

You can also look into tools like inotifywait or fsmon depending on what you are trying to accomplish. You can also install busybox for Android which contains the watch command.

Jared Rummler
  • 37,824
  • 19
  • 133
  • 148
  • Thank you very much . it works is there any way i can store generated data in text file. sorry i am new to ADB – tomtom Dec 15 '17 at 09:13
  • https://stackoverflow.com/questions/11162406/open-and-write-data-on-text-file-by-bash-shell-scripting If this answer solved your issue, please mark it as accepted. – Jared Rummler Dec 15 '17 at 09:30