Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tag -a "$(tag -Nl source_file)" destination_file
- #!/usr/bin/env zsh
- if [[ $# -ne 2 ]]; then
- print >&2 "usage: copy_xattrs SOURCE_FILE TARGET_FILE"
- exit 1
- fi
- set -e
- IFS=$'n' attr_names=($(xattr "$1"))
- for attr in $attr_names; do
- value=$(xattr -p -x "$attr" "$1" | tr -d " n")
- xattr -w -x "$attr" "$value" "$2"
- done
Add Comment
Please, Sign In to add comment