When I run
ls -1 *.a | xargs -I{} echo {} | sed 's/.a//'
The output is
1
2
3
When I run
ls -1 *.a | xargs -I{} bash -c "echo {} $(echo {} | sed 's/.a//')"
and the output is
1.a 1.a
2.a 2.a
3.a 3.a
What is the reason for this anomaly?
برچسب:
نویسنده: استخدام کار