-1

I entered a Terminal command into TextEdit, but i don't know the hash to Terminal, so I can't change it. I tried changing it into .bash and .rtf, but they don't work. Help Plz???

1

When using TextEdit to write shell scripts or similar,

  • make sure that TextEdit is in plan text (and not in rich text) mode (check the format menu)
  • use #!/bin/bash as the first line
  • run chmod +x /path/to/file once after saving it
  • use /path/to/file (or, if it is in the current directory, ./file) to execute it

You must log in to answer this question.

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