Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
fomine3
5y ago
0 comments
Share
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.
0 comments
default
newest
oldest
brokenmachine
5y ago
Why not use null as a separator?
I agree it's messy but not that hard. Just set IFS to null.
enriquto
5y ago
filenames are variable names. Choosing good filenames is the first step in writing a nice shell script in a situation that you control.
fomine3
OP
5y ago
It's sometimes in control or out of control. Writing script in defensive way is better for security if filename is out of control.
Quekid5
5y ago
No, they aren't -- they are data.
j
/
k
navigate · click thread line to collapse