Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- for i in {1..10};
- do
- echo "Call: $l"
- # YOUR COMMAND CALL - here you call your program
- 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
- echo "Moving files..."
- mv "INTERFICIE/lot$i/*" DESTINATION # Substitute it with mv
- else
- echo "An error ocurred"
- exit
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement