Friday, 15 January 2010

sh - Escape the current file name "{}" of shell find -exec in the subcommand result "$()"? -



sh - Escape the current file name "{}" of shell find -exec in the subcommand result "$()"? -

i want run like:

find . -type files -exec echo "touch -cmd '"$(date --utc -r '{}' +"%y-%m-%d %h:%m:%s.%n +0000")"' "$(ls --quoting-style=shell '{}')

it doesn't seem work since "{}" doesn't seem expanded in $(). how create work right?

simplify problem.

write shell script, , shell script working. execute shell script using find.

find . -type files -exec myscript '{}'

sh

No comments:

Post a Comment