Re:The Beauty of Unix Pipelines
by fomine3 on Thursday June 04, 2020 @10:01PM
(#23424260)
The fact that filename can contain anything except NULL/slash is really pain. I often write a shell script that treats LF as separator but I know it's not good.
[ Parent
| on HN ]
Re:The Beauty of Unix Pipelines
by brokenmachine on Wednesday June 10, 2020 @08:38PM
(#23483917)
Why not use null as a separator?
I agree it's messy but not that hard. Just set IFS to null.
filenames are variable names. Choosing good filenames is the first step in writing a nice shell script in a situation that you control.
It's sometimes in control or out of control. Writing script in defensive way is better for security if filename is out of control.