Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
fomine3
6y ago
0 comments
Save
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
4 comments · 2 top-level
top
newest
oldest
enriquto
6y ago
· 2 in thread
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
6y 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
6y ago
No, they aren't -- they are data.
brokenmachine
6y ago
Why not use null as a separator?
I agree it's messy but not that hard. Just set IFS to null.
j
/
k
navigate · click thread line to collapse