3 ms·
My epiphany was using find | xargs and realizing I need -print0 for the former and -0 for the latter to handle special characters. Then I realized all my previ
by xarope 5y ago
My epiphany was using find | xargs and realizing I need -print0 for the former and -0 for the latter to handle special characters. Then I realized all my previous bash scripts were WRONG...
- aaaaaaaaaaab 5y agoZero-delimited versions of common bash tools/idioms: xargs -0 find ... -print0 sort -z while IFS= read -r -d '' var; do ...; done env -0 printf -- '%s\0' *
- nieve 5y agoDon't you mean ascii null, not zero?
- kevin_thibedeau 5y agoDon't you mean NUL, not null?