Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #!/bin/bash
  2. for i in {1..10};
  3. do
  4.     echo "Call: $l"
  5.     # YOUR COMMAND CALL - here you call your program
  6.     tmp_content=$(find /tmp/ -maxdepth 1 -type f) # Returns the files found. In our case we want it to return nothing. Specify correct ABSOLUTE paths for both commands
  7.     intf_contet=$(find /tmp/ -maxdepth 1 -type f) # Specify the correct path
  8.     if [ -z "$tmp_content" ] && [ -z "$intf_content" ]; then # Here we check if the directories are indeed empty
  9.         echo "Moving files..."
  10.         mv "INTERFICIE/lot$i/*" DESTINATION # Substitute it with mv
  11.     else
  12.         echo "An error ocurred"
  13.         exit
  14.     fi
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement