Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone know if bashscript could be updated to allow spaces between assignment? I can't see how it would break existing programs (but I'm sure there's a catch) and scripts would be much cleaner (and less of an headache).


A breaking example might be trying to find lines containing an "=" in a file:

    grep = my_file
Also a problem is the syntax for running a program with environment assignments that apply only to the program:

    env1=foo env2=bar env3= my_program
Note that under POSIX rules, "env3" here is assigned a zero-length string. Making these sorts of assignments work with spaces around the equal signs would open up a can of worms.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: