Hacker News new | past | comments | ask | show | jobs | submit login
Foreach Derp with Csh (syncpup.com)
5 points by todsacerdoti 9 months ago | hide | past | favorite | 6 comments



Weirdly, I don't see foreach in the classic "Csh Programming Considered Harmful"[1], which is imo the definitive Csh reference text.

[1] https://www-uxsup.csx.cam.ac.uk/misc/csh.html


Is this an AI generated piece? I get tripped when I see sentences like this 'To see this word list more clearly, this is illuminating:'


Wow, someone in 2023 using csh as a daily driver.


You'd be surprised. I've worked at 2 large hardware companies you've definitely heard of and both use tcsh. I guess it's a holdover from the early-mid 90s when the shell story was very different from today, especially across unixes (we had some SunOS and AIX) and from what I understand csh was the most portable or consistent.

Old habits die hard


tcsh was the obvious choice back then, it had the best completion and interactive features by a mile, in a way it was then what fish shell is today. That said, most people I know who still use tcsh do all their scripting in bash, again rather like fish, it just has too many gotchas. In fact, I got a production bug report about two months ago because one of our commands accepts a python-like format string as an argument, and the exclamation point they wanted to use inside it is interpreted by tcsh before interpreting the surrounding quotes. Purely a cshism, but still we got pinged for it.


I worked as a subcontractor once for a team that used csh for scripting. That project was doomed from the start.

Now that I think about it it's possible it was a Sun box.




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

Search: