daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # This is comment!
  3. echo Hello World
  4. for file1 in /C:/Users/shubham.tomar/Desktop/Shell/Test1/*;
  5. do
  6. filename1=$(basename "$file1")
  7. echo $filename1
  8. echo "------------------------"
  9. for file2 in /C:/Users/shubham.tomar/Desktop/Shell/Test2/*;
  10. do
  11. filename2=$(basename "$file2")
  12. echo $filename2
  13. if [["filename1" = "filename2"]]; then
  14. echo "---File matched---"
  15. else
  16. mv -f /C:/Users/shubham.tomar/Desktop/Shell/Test2/$filename2 /C:/Users/shubham.tomar/Desktop/Shell/Moved/
  17. fi
  18. echo "--------------File Moved-----------"
  19. done
  20. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top