Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. copy_function() {
  4.  
  5. if $1 $2 $3 $4;then
  6. echo "copied directory and contents"
  7. else
  8. echo "failed"
  9. exit 1
  10. fi
  11. }
  12.  
  13. copy_function mkdir -p ~/TestFolder/TestFile/
  14. copy_function cp -pr my_data/* /TestFolder/TestFile/
  15.  
  16. copy_function() {
  17.  
  18. if $1 $2 $3 $4;then
  19. echo "copied directory and contents"
  20. else
  21. echo "failed"
  22. exit 1
  23. fi
  24. }
  25.  
  26. copy_function mkdir -p ~/TestFolder/TestFile/
  27. copy_function cp -pr my_data/* /TestFolder/TestFile/
  28.  
  29. if "$@"; then
  30.  
  31. else
  32. echo failed >&2
  33.  
  34. mkdir -p ~/TestFolder
  35. cp -vpR mydata ~/TestFolder/TestFile
Add Comment
Please, Sign In to add comment