I recently answered a question about the availability of the flock(1) shell scripting utility on OS X. This question has just been migrated to Super User and I'm not entirely sure why.

The question is Mac OS X equivalent of Linux flock(1) command

The only use I can see for the flock command would be in a shell script. My answer stated that the flock command does not exist on OS X and that the alternative would be shlock, the sh in shlock stands for shell.

From the shlock man page:

shlock -- create or verify a lock file for shell scripts

From the flock man page (on Linux):

flock - Manage locks from shell scripts

Is shell scripting not considered programming on Stack Overflow? This migration doesn't seem correct to me!

  • While it might be possible to lock a file on the command line in an interactive shell I think it is much more likely the OP is trying to migrate a shell script from Linux to OS X. The answer you point at also begs the question why this was moved to SuperUser and not Unix and Linux. Either way this still feels like a bad migration to me.
    – mttrb
    May 13, 2012 at 6:13
  • I certainly grant you that this is one of those corner cases where a "perfect" spot for the question might have been any or all of the above under the right circumstances. I thought there was a better exemplar of a shell scripts question on Meta, but there are related ones meta.stackexchange.com/questions/46382/… and meta.stackexchange.com/questions/16394/…. I'm not necessarily saying it was a correct migration, but just trying examine how it may have been interpreted.
    – jonsca
    May 13, 2012 at 6:21
  • You may have a point about U+L, their faq says: The Unix foundation underlying MacOS (but generally not frontend application questions) [is on topic]
    – jonsca
    May 13, 2012 at 6:36
  • 2
    @jonsca I'm not a mod on U&L, but I am a very active user there. mttrb: SU has a community migration path from SO, U&L doesn't. This question is on-topic on all of SO, SU, U&L and Ask Different; it shouldn't have been migrated from where it was posted. May 13, 2012 at 15:15
  • @Gilles I should have verified that before I wrote it. You're a mod just about everywhere else, and that was an authoritative answer, so I just assumed, hehe. My apologies.
    – jonsca
    May 14, 2012 at 0:41

2 Answers 2


I agree that shell programming, rather than interactive use, is a topic properly handled by Stack Overflow, not by Superuser I do not believe it should have been migrated.

However, I am increasingly in the minority in this. It’s almost as if the “real” programmers are taking a swipe at shell programming.

Since a good shell will allow you to construct on-the-fly de facto scripts by entering them in interactive mode, the distinction is blurry, leaving everything far too open to interpretation.

  • 2
    It sort of depends on why they ask the question. An answer on StackOverflow to a NT Batch or shell scripting question may be, "Shell scripting is a bad idea in this case; here's a 20 line Perl/C#/C program which does it better." On SuperUser, you're far less likely to get a response like that and far more likely to get the script you're looking for.
    – user7116
    May 13, 2012 at 14:20
  • 1
    Unix & Linux fields a lot of shell programming questions too. Shell scripting is on-topic both for programmer communities (because it's programming) and user and sysadmin communities (because it's automating a user/sysadmin task). May 13, 2012 at 15:16
  • 2
    There has always been a problem with shell programming on SO because we have always had people coming and asking about shell primitives in ways that make it seem likely that they are just noodling at the command line. When I was more active on SO I used to jump on those with "Explain the programming context or risk migration" comments. May 13, 2012 at 17:05

I agree. It also looks like the migration was rejected at Super User (closed and deleted) shortly after you posted this.

I've reopened the question on Stack Overflow.

  • Out of curiosity's sake, why was it closed there?
    – user7116
    May 13, 2012 at 14:42
  • Not sure. They probably just decided it shouldn't have been migrated either. May 13, 2012 at 14:44
  • 1
    Thanks! BTW, what’s a Unicom, anyway? :)
    – tchrist
    May 13, 2012 at 15:03
  • @tchrist it is unicorn. R N at the end, not M. (Ignore me if you were making a joke of which iI am blissfully unaware!) May 13, 2012 at 15:47
  • @AndrewBarber Yes, it was a joke.
    – tchrist
    May 13, 2012 at 15:59
  • @tchrist silly, silly me May 13, 2012 at 16:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .