Timeline for Why basename don't work here [duplicate]
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 10, 2023 at 16:19 | vote | accept | Alysko | ||
| Aug 26, 2022 at 22:55 | history | closed |
muru jesse_b Stephen Kitt AdminBee thrig |
Duplicate of How do I use command substitution in find -exec? | |
| Aug 4, 2022 at 1:52 | review | Close votes | |||
| Aug 26, 2022 at 22:55 | |||||
| Aug 2, 2022 at 13:50 | comment | added | terdon♦ |
Never do for i in $(ls). It is bad practice, likely to break, and is harder than the simpler and safer for i in *.
|
|
| Aug 2, 2022 at 13:46 | answer | added | Chris Davies | timeline score: 4 | |
| Aug 2, 2022 at 13:21 | comment | added | Kamil Maciorowski |
Because the shell replaces $(basename {}) with {} before xargs starts. There's probably a duplicate question somewhere. I know one on Super User.
|
|
| S Aug 2, 2022 at 13:15 | review | First questions | |||
| Aug 2, 2022 at 13:56 | |||||
| S Aug 2, 2022 at 13:15 | history | asked | Alysko | CC BY-SA 4.0 |