Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by kevinmgranger

10 years ago

If anyone is having trouble getting the first one working, you need a shebang at the top of the file!

    $ printf '#!/usr/bin/env sh\ncat > "$@"\n' > editor

But the second point is more valid. Ed is the standard editor.

1 comment

kevinmgranger

Reply

unhammer  10 years ago

What system are you on that needs the shebang? bash 4 on Ubuntu seems to just run it in bash, though I guess it probably shouldn't :-)

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities