Reputation: 1
For example I want to take the content of file named "comment" to be the value of setattr's -v option, something like
cat comment | setfattr -n user.comment -v - filewanttotaged
but this does not work, neither do
cat comment | xargs setfattr -n user.comment -v - filewantedtotaged
For the latter case, the content is treated as file arugment for setfattr, instead of value of option -v
So how to do this job? Thank you very much!
Upvotes: 0
Views: 193
Reputation: 37782
you can use xargs, but make sure its arguments are not at the end, but after your "-v" option:
cat comment | xargs -i setfattr -n user.comment -v {} filewantedtotaged
Upvotes: 2