Advertisement
Guest User

Untitled

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