Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- copy_function() {
- if $1 $2 $3 $4;then
- echo "copied directory and contents"
- else
- echo "failed"
- exit 1
- fi
- }
- copy_function mkdir -p ~/TestFolder/TestFile/
- copy_function cp -pr my_data/* /TestFolder/TestFile/
- copy_function() {
- if $1 $2 $3 $4;then
- echo "copied directory and contents"
- else
- echo "failed"
- exit 1
- fi
- }
- copy_function mkdir -p ~/TestFolder/TestFile/
- copy_function cp -pr my_data/* /TestFolder/TestFile/
- if "$@"; then
- else
- echo failed >&2
- mkdir -p ~/TestFolder
- cp -vpR mydata ~/TestFolder/TestFile
Add Comment
Please, Sign In to add comment